def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--all', dest="run_all", action="store_true", help="run all of the clients' integration tests") parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_all=False, run_certbot=False, run_chisel=False) args = parser.parse_args() if not (args.run_all or args.run_certbot or args.run_chisel or args.custom is not None): raise Exception( "must run at least one of the letsencrypt or chisel tests with --all, --certbot, --chisel, or --custom" ) now = datetime.datetime.utcnow() seventy_days_ago = now + datetime.timedelta(days=-70) if not startservers.start(race_detection=True, fakeclock=fakeclock(seventy_days_ago)): raise Exception("startservers failed (mocking seventy days ago)") setup_seventy_days_ago() startservers.stop() if not startservers.start(race_detection=True): raise Exception("startservers failed") if args.run_all or args.run_chisel: run_chisel() # Simulate a disconnection to make sure gRPC reconnects work. startservers.bounce_forward() if args.run_all or args.run_certbot: run_client_tests() if args.custom: run(args.custom) if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--all', dest="run_all", action="store_true", help="run all of the clients' integration tests") parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_all=False, run_certbot=False, run_chisel=False) args = parser.parse_args() if not (args.run_all or args.run_certbot or args.run_chisel or args.custom is not None): raise Exception("must run at least one of the letsencrypt or chisel tests with --all, --certbot, --chisel, or --custom") now = datetime.datetime.utcnow() seventy_days_ago = now+datetime.timedelta(days=-70) if not startservers.start(race_detection=True, fakeclock=fakeclock(seventy_days_ago)): raise Exception("startservers failed (mocking seventy days ago)") setup_seventy_days_ago() startservers.stop() if not startservers.start(race_detection=True): raise Exception("startservers failed") if args.run_all or args.run_chisel: run_chisel() # Simulate a disconnection to make sure gRPC reconnects work. startservers.bounce_forward() if args.run_all or args.run_certbot: run_client_tests() if args.custom: run(args.custom) if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--all', dest="run_all", action="store_true", help="run all of the clients' integration tests") parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") parser.add_argument('--load', dest="run_loadtest", action="store_true", help="run load-generator") parser.add_argument('--filter', dest="test_case_filter", action="store", help="Regex filter for test cases") parser.add_argument('--skip-setup', dest="skip_setup", action="store_true", help="skip integration test setup") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_all=False, run_certbot=False, run_chisel=False, run_loadtest=False, test_case_filter="", skip_setup=False) args = parser.parse_args() if not (args.run_all or args.run_certbot or args.run_chisel or args.run_loadtest or args.custom is not None): raise Exception( "must run at least one of the letsencrypt or chisel tests with --all, --certbot, --chisel, --load or --custom" ) if not args.skip_setup: now = datetime.datetime.utcnow() seventy_days_ago = now + datetime.timedelta(days=-70) if not startservers.start(race_detection=True, fakeclock=fakeclock(seventy_days_ago)): raise Exception("startservers failed (mocking seventy days ago)") setup_seventy_days_ago() global caa_client caa_client = chisel.make_client() startservers.stop() now = datetime.datetime.utcnow() twenty_days_ago = now + datetime.timedelta(days=-20) if not startservers.start(race_detection=True, fakeclock=fakeclock(twenty_days_ago)): raise Exception("startservers failed (mocking twenty days ago)") setup_twenty_days_ago() startservers.stop() caa_acount_uri = caa_client.account.uri if caa_client is not None else None if not startservers.start(race_detection=True, account_uri=caa_acount_uri): raise Exception("startservers failed") if not args.skip_setup: setup_zero_days_ago() if args.run_all or args.run_chisel: run_chisel(args.test_case_filter) if args.run_all or args.run_certbot: run_client_tests() if args.run_all or args.run_loadtest: run_loadtest() if args.custom: run(args.custom) run_cert_checker() check_balance() run_expired_authz_purger() if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--all', dest="run_all", action="store_true", help="run all of the clients' integration tests") parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") parser.add_argument('--load', dest="run_loadtest", action="store_true", help="run load-generator") parser.add_argument('--filter', dest="test_case_filter", action="store", help="Regex filter for test cases") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_all=False, run_certbot=False, run_chisel=False, run_loadtest=False, test_case_filter="") args = parser.parse_args() if not (args.run_all or args.run_certbot or args.run_chisel or args.run_loadtest or args.custom is not None): raise Exception("must run at least one of the letsencrypt or chisel tests with --all, --certbot, --chisel, --load or --custom") now = datetime.datetime.utcnow() seventy_days_ago = now+datetime.timedelta(days=-70) if not startservers.start(race_detection=True, fakeclock=fakeclock(seventy_days_ago)): raise Exception("startservers failed (mocking seventy days ago)") setup_seventy_days_ago() startservers.stop() now = datetime.datetime.utcnow() twenty_days_ago = now+datetime.timedelta(days=-20) if not startservers.start(race_detection=True, fakeclock=fakeclock(twenty_days_ago)): raise Exception("startservers failed (mocking twenty days ago)") setup_twenty_days_ago() startservers.stop() if not startservers.start(race_detection=True, account_uri=caa_client.account.uri): raise Exception("startservers failed") setup_zero_days_ago() if args.run_all or args.run_chisel: run_chisel(args.test_case_filter) if args.run_all or args.run_certbot: run_client_tests() if args.run_all or args.run_loadtest: run_loadtest() if args.custom: run(args.custom) run_cert_checker() check_balance() run_expired_authz_purger() if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") parser.add_argument('--filter', dest="test_case_filter", action="store", help="Regex filter for test cases") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_certbot=False, run_chisel=False, test_case_filter="", skip_setup=False) args = parser.parse_args() if not (args.run_certbot or args.run_chisel or args.run_loadtest or args.custom is not None): raise Exception( "must run at least one of the letsencrypt or chisel tests with --certbot, --chisel, or --custom" ) if not args.test_case_filter: now = datetime.datetime.utcnow() six_months_ago = now + datetime.timedelta(days=-30 * 6) if not startservers.start(race_detection=True, fakeclock=fakeclock(six_months_ago)): raise Exception("startservers failed (mocking six months ago)") v1_integration.caa_client = caa_client = chisel.make_client() setup_six_months_ago() startservers.stop() twenty_days_ago = now + datetime.timedelta(days=-20) if not startservers.start(race_detection=True, fakeclock=fakeclock(twenty_days_ago)): raise Exception("startservers failed (mocking twenty days ago)") setup_twenty_days_ago() startservers.stop() if not startservers.start(race_detection=True): raise Exception("startservers failed") if args.run_chisel: run_chisel(args.test_case_filter) if args.run_certbot: run_client_tests() run_go_tests() if args.custom: run(args.custom) # Skip the last-phase checks when the test case filter is one, because that # means we want to quickly iterate on a single test case. if not args.test_case_filter: run_cert_checker() check_balance() if not CONFIG_NEXT: run_expired_authz_purger() # Run the boulder-janitor. This should happen after all other tests because # it runs with the fake clock set to the future and deletes rows that may # otherwise be referenced by tests. run_janitor() # Run the load-generator last. run_loadtest will stop the # pebble-challtestsrv before running the load-generator and will not restart # it. run_loadtest() if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--all', dest="run_all", action="store_true", help="run all of the clients' integration tests") parser.add_argument('--certbot', dest='run_certbot', action='store_true', help="run the certbot integration tests") parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") parser.add_argument('--load', dest="run_loadtest", action="store_true", help="run load-generator") parser.add_argument('--filter', dest="test_case_filter", action="store", help="Regex filter for test cases") parser.add_argument('--skip-setup', dest="skip_setup", action="store_true", help="skip integration test setup") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_all=False, run_certbot=False, run_chisel=False, run_loadtest=False, test_case_filter="", skip_setup=False) args = parser.parse_args() if not (args.run_all or args.run_certbot or args.run_chisel or args.run_loadtest or args.custom is not None): raise Exception( "must run at least one of the letsencrypt or chisel tests with --all, --certbot, --chisel, --load or --custom" ) caa_client = None if not args.skip_setup: now = datetime.datetime.utcnow() seventy_days_ago = now + datetime.timedelta(days=-70) if not startservers.start(race_detection=True, fakeclock=fakeclock(seventy_days_ago)): raise Exception("startservers failed (mocking seventy days ago)") setup_seventy_days_ago() v1_integration.caa_client = caa_client = chisel.make_client() startservers.stop() now = datetime.datetime.utcnow() twenty_days_ago = now + datetime.timedelta(days=-20) if not startservers.start(race_detection=True, fakeclock=fakeclock(twenty_days_ago)): raise Exception("startservers failed (mocking twenty days ago)") setup_twenty_days_ago() startservers.stop() if not startservers.start(race_detection=True): raise Exception("startservers failed") if not args.skip_setup: setup_zero_days_ago() if args.run_all or args.run_chisel: run_chisel(args.test_case_filter) if args.run_all or args.run_certbot: run_client_tests() if args.custom: run(args.custom) run_cert_checker() # Skip load-balancing check when test case filter is on, since that usually # means there's a single issuance and we don't expect every RPC backend to get # traffic. if not args.test_case_filter: check_balance() if not CONFIG_NEXT: run_expired_authz_purger() # Run the load-generator last. run_loadtest will stop the # pebble-challtestsrv before running the load-generator and will not restart # it. if args.run_all or args.run_loadtest: run_loadtest() if not startservers.check(): raise Exception("startservers.check failed") global exit_status exit_status = 0
def main(): parser = argparse.ArgumentParser(description='Run integration tests') parser.add_argument('--chisel', dest="run_chisel", action="store_true", help="run integration tests using chisel") parser.add_argument('--gotest', dest="run_go", action="store_true", help="run Go integration tests") parser.add_argument('--filter', dest="test_case_filter", action="store", help="Regex filter for test cases") # allow any ACME client to run custom command for integration # testing (without having to implement its own busy-wait loop) parser.add_argument('--custom', metavar="CMD", help="run custom command") parser.set_defaults(run_chisel=False, test_case_filter="", skip_setup=False) args = parser.parse_args() if not (args.run_chisel or args.custom or args.run_go is not None): raise (Exception( "must run at least one of the letsencrypt or chisel tests with --chisel, --gotest, or --custom" )) if not startservers.install(race_detection=race_detection): raise (Exception("failed to build")) # Setup issuance hierarchy startservers.setupHierarchy() if not args.test_case_filter: now = datetime.datetime.utcnow() six_months_ago = now + datetime.timedelta(days=-30 * 6) if not startservers.start(fakeclock=fakeclock(six_months_ago)): raise (Exception("startservers failed (mocking six months ago)")) setup_six_months_ago() startservers.stop() twenty_days_ago = now + datetime.timedelta(days=-20) if not startservers.start(fakeclock=fakeclock(twenty_days_ago)): raise (Exception("startservers failed (mocking twenty days ago)")) setup_twenty_days_ago() startservers.stop() if not startservers.start(fakeclock=None): raise (Exception("startservers failed")) if args.run_chisel: run_chisel(args.test_case_filter) if args.run_go: run_go_tests(args.test_case_filter) if args.custom: run(args.custom.split()) # Skip the last-phase checks when the test case filter is one, because that # means we want to quickly iterate on a single test case. if not args.test_case_filter: run_cert_checker() check_balance() # Run the load-generator last. run_loadtest will stop the # pebble-challtestsrv before running the load-generator and will not restart # it. run_loadtest() if not startservers.check(): raise (Exception("startservers.check failed")) # This test is flaky, so it's temporarily disabled. # TODO(#4583): Re-enable this test. #check_slow_queries() global exit_status exit_status = 0