HomePhorge

(Maint) Fix time-dependent certificate factory test failures
acd2f917cb05Unpublished

Unpublished Commit ยท Learn More

Repository Importing: This repository is still importing.

Description

(Maint) Fix time-dependent certificate factory test failures

Some of the certificate factory spec tests were trying to ensure that
the certificate factory's ttl was being applied when signing a
certificate's not_after time. However, the tests did not take into
account the amount of time it takes to sign the certificate, which can
be non-negligible.

As a result, the absolute difference between not_after and `Time.now +
ttl` was somtimes greater than or equal to 1 second, causing sporadic
test failures.

This commit changes the tests to be less time dependent by ensuring the
difference is within 30 seconds (for both not_before and `not_after)

Details

Provenance
Josh Cooper <josh@puppetlabs.com>Authored on
vanmeeuwenPushed on Jun 2 2015, 2:22 PM
Parents
rPUb79be3bc80a4: Merge pull request #334 from daniel-pittman/feature/2.7.x/merge-2.6.x-branch
Branches
Unknown
Tags
Unknown

Event Timeline

Josh Cooper <josh@puppetlabs.com> committed rPUacd2f917cb05: (Maint) Fix time-dependent certificate factory test failures (authored by Josh Cooper <josh@puppetlabs.com>).Jan 16 2012, 1:32 AM