boulder/test
Jacob Hoffman-Andrews 4128e0d95a Add time-dependent integration testing (#3060)
Fixes #3020.

In order to write integration tests for some features, especially related to rate limiting, rechecking of CAA, and expiration of authzs, orders, and certs, we need to be able to fake the passage of time in integration tests.

To do so, this change switches out all clock.Default() instances for cmd.Clock(), which can be set manually with the FAKECLOCK environment variable. integration-test.py now starts up all servers once before the main body of tests, with FAKECLOCK set to a date 70 days ago, and does some initial setup for a new integration test case. That test case tries to fetch a 70-day-old authz URL, and expects it to 404.

In order to make this work, I also had to change a number of our test binaries to shut down cleanly in response to SIGTERM. Without that change, stopping the servers between the setup phase and the main tests caused startservers.check() to fail, because some processes exited with nonzero status.

Note: This is an initial stab at things, to prove out the technique. Long-term, I think we will want to use an idiom where test cases are classes that have a number of optional setup phases that may be run at e.g. 70 days prior and 5 days prior. This could help us avoid a proliferation of global state as we add more time-dependent test cases.
2017-09-13 12:34:14 -07:00
..
boulder-tools Switch to using go 1.9 (#3047) 2017-09-06 16:30:13 -04:00
config Bring test/config up-to-date. (#3056) 2017-09-11 16:55:58 -04:00
config-next Implement legacy form of CAA (#3075) 2017-09-13 10:16:12 -04:00
ct-test-srv Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
dns-test-srv Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
grafana Grafana dashboard update. (#2786) 2017-05-26 10:53:43 -04:00
grpc-creds Split out separate RPC services for issuing and for signing OCSP (#2452) 2017-01-05 15:08:39 -08:00
gsb-test-srv Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
load-generator Fix load generator nonce source (#2971) 2017-08-11 10:43:51 -07:00
mail-test-srv Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
ocsp Add a host override flag for checkocsp. (#3035) 2017-09-01 11:56:48 -07:00
prometheus Add Prometheus collection for WFE to default config. (#2675) 2017-04-13 10:07:28 -07:00
secrets Remove some last traces of AMQP. (#2687) 2017-04-20 10:43:17 -07:00
vars Fix max_statement_time and long_query_time (#2311) 2016-11-08 09:07:36 -05:00
caa-servfail-exceptions.txt Add enforcement for CAA SERVFAIL (#1971) 2016-06-28 11:00:23 -07:00
cfssl-config.json Move cert-csr check to boulder/core and review fixes 2015-06-02 17:56:28 +01:00
chisel.py Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
create_db.sh Add NewOrder RPCs + methods to SA and RA (#2907) 2017-08-11 14:24:25 -04:00
ct-key.pem Use a EC key to sign CT signatures, plus properly load it 2015-12-15 13:50:43 -08:00
db-common.sh * Delete Policy DB.This is no longer needed now that we have a JSON policy file.* Fix tests.* Revert Dockerfile.* Fix create_db* Simplify user addition.* Fix tests.* Fix tests* Review fixes.https://github.com/letsencrypt/boulder/pull/1773 2016-04-29 12:12:24 -07:00
db.go * Delete Policy DB.This is no longer needed now that we have a JSON policy file.* Fix tests.* Revert Dockerfile.* Fix create_db* Simplify user addition.* Fix tests.* Fix tests* Review fixes.https://github.com/letsencrypt/boulder/pull/1773 2016-04-29 12:12:24 -07:00
docker-environment Switch to Golang 1.6.3 (#2105) 2016-08-05 16:35:43 -04:00
drop_users.sql Add cmd/expired-authz-purger (#1828) 2016-06-03 16:00:19 -04:00
entrypoint.sh Log when the boulder container connects to the database container (#2847) 2017-07-07 11:31:05 -04:00
example-expiration-template Review fixes 2015-07-27 12:46:09 -07:00
example-weak-keys.json Basic RSA known weak key checking (#2765) 2017-05-25 09:33:58 -07:00
hostname-policy.json Add explicit forbidden names validation to cert-checker (#2373) 2016-12-02 11:55:24 -08:00
integration-test.py Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
issuer-ocsp-responder.json Improve single-ocsp command (#2181) 2016-09-15 15:28:54 -07:00
make-softhsm.sh Switch to using go 1.9 (#3047) 2017-09-06 16:30:13 -04:00
migrate-up.sh Add a test that there are no outdated migrations. 2015-09-18 14:53:40 -07:00
mock-vendor.go Force godep to vendor github.com/golang/mock/mockgen/model (#2792) 2017-05-31 16:09:44 -07:00
rate-limit-policies-b.yml Splits CountRegistrationsByIP to exact-match and by /48. (#2782) 2017-05-30 15:12:20 -07:00
rate-limit-policies.yml Splits CountRegistrationsByIP to exact-match and by /48. (#2782) 2017-05-30 15:12:20 -07:00
requirements.txt Refactor integration test. 2017-01-22 20:51:27 -08:00
run-docker.sh Duplicate WFE to WFE2. (#2839) 2017-07-05 13:32:45 -07:00
sa_db_users.sql Add NewOrder RPCs + methods to SA and RA (#2907) 2017-08-11 14:24:25 -04:00
setup.sh Purge remaining AMQP code (#2648) 2017-04-04 15:02:22 -07:00
startservers.py Add time-dependent integration testing (#3060) 2017-09-13 12:34:14 -07:00
test-ca.der Unflake OCSP integration test 2015-10-21 14:38:15 -07:00
test-ca.key Make it easier to start a test config. 2015-04-09 18:26:40 -07:00
test-ca.key-pkcs11.json Improve single-ocsp command (#2181) 2016-09-15 15:28:54 -07:00
test-ca.key.der Add DER form of test-ca key in-tree. (#2041) 2016-07-12 09:06:59 -07:00
test-ca.pem Unflake OCSP integration test 2015-10-21 14:38:15 -07:00
test-ca2.pem Add multi-issuer support to the CA. 2016-03-21 20:56:58 -07:00
test-no-outdated-migrations.sh Fix mktemp to be MacOS compatible 2015-09-23 13:16:16 -07:00
test-root.key Unflake OCSP integration test 2015-10-21 14:38:15 -07:00
test-root.key-pkcs11.json Improve single-ocsp command (#2181) 2016-09-15 15:28:54 -07:00
test-root.key.der Improve single-ocsp command (#2181) 2016-09-15 15:28:54 -07:00
test-root.pem Unflake OCSP integration test 2015-10-21 14:38:15 -07:00
test-tools.go Remote VA logging and stats (#3063) 2017-09-11 12:50:50 -07:00
travis-before-install.sh use go_import_path setting in Travis CI (#2923) 2017-07-31 10:47:55 -07:00
wfe.key Use X.509 AIA Issuer URL in rel="up" link header (#2545) 2017-02-07 11:19:22 -08:00
wfe.pem Use X.509 AIA Issuer URL in rel="up" link header (#2545) 2017-02-07 11:19:22 -08:00