Commit Graph

55 Commits

Author SHA1 Message Date
James Munnelly
0237d5a4c2 Write log files to artifacts directory instead of stdout
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 20:45:44 +00:00
James Munnelly
0fcc0c666c Update copyright header year
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 15:07:55 +00:00
James Munnelly
5a17c58c03 Rearrange Helm charts into deploy/ and test/e2e/charts directories
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-12-04 16:19:49 +00:00
James Munnelly
2d28270d9f Print pod logs on e2e test case failure
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-27 14:21:25 +00:00
Max Ehrlich
bbd9249198 Configurable issuer duration and renewBefore Take 2 (#893)
* Configurable issuer duration and renewBefore [1/3]

This is part one of (probably) three parts manually moving the changes from commit 723015174a167d746323f506ab3575cfb243d8bd to the new master. This commit moves the basic functionality of configurable duration while skipping e2e tests and docs. It does not include new work.

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Configurable issuer duration and renewBefore [2/3]

This commit moves over most of the e2e testing updates, some things are intentionally left out as they may be obsolete

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Configurable issuer duration and renewBefore [3/3]

This commit moves the documentation changes, completely the migration of the original code to the latest master

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning all hack scripts with since the massive bazel update

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add missing boilerplate headers

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun codegen hack

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning update-docs hack

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix failing unit tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix build errors in e2e tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun update-deps

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Don't recreate the CA issuer, it already exists

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Need to create new issuers for the duration and renew time tests because those fields are set in the issuer, so make sure they are named uniquely

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add duration e2e tests for self-signed issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add duration e2e tests for vault w/ custom mount path

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add validation to disallow acme certificates with duration and renewBefore set and update unit tests to verify

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update docs to mention duration/renew for self-signed issuer and fix potential parsing errors with rst formatting

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Self-signed issuer was missing duration validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix a bug causing certificates with a short enough renew-before w.r.t their duration to be renewed instantly and forever

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Print the exact time until renewal

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move duration and renwal validation to the issuer validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests to work with new validation

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add e2e test for the self-signed issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Redo cert duration and renew before to appear as part of the CSR and not the issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Updating tests to match new duration/renewbefore format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests to match new format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update docs to reflect changing the field from issuers to certificates

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove event firing and replace with a TODO as of discussion on PR

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Run hack scripts

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove the sync unit test since without events there is no way to catch the warnings that it was testing

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Use IssuerOptions RenewBeforeExpiryDuration if certificates dont set a renewBefore value for immediate renewal checks

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Delete check on certificate data length in e2e test for certificate duration as there is no reason it should be there

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Update e2e tests since certificate creation will never generate an event

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning hack scripts after big rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix a few problems that slipped through during the rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix an e2e error that resulted from the rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add unit test for the calculateTimeBeforeExpiry function

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Adding back in a bunch of missing error checks

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove unused function

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add missing boilerplate

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove unused constant

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move log constants to function body

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerun hack scripts

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove mistakenly commited file

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove double-import of util package

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix bad function call in e2e vault issuer

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change duration and renewBefore to be pointer fields as they are optional

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Remove wrong vault issuer test that got passed the rebase somehow

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change e2e to use pointer format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move e2e cert tests out of issuer test file

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Move e2e self-signed issuer test to new location

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Make sure to check for nil in GenerateTemplate

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Add more empty checks to be safe

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Rerunning hacks after rebase

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix bad function call in new e2e test

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Try not setting duration and renewbefore on acme e2e tests

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Zero checks should really just be replaced by nil tests, zero should be caught as any other too-small value

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fixed a missing nil check that got away

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Change e2e duration test format to use pointer times to better simulate API calls

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix sync unit test to match e2e test format

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Fix vault e2e test

Signed-off-by: Max Ehrlich <max.ehr@gmail.com>

* Revert changes to Certificate sync function

Signed-off-by: James Munnelly <james@munnelly.eu>

* Remove selfsigned e2e issuer.go

Signed-off-by: James Munnelly <james@munnelly.eu>

* Don't use ACME issuer in duration example and tidy up line endings

Signed-off-by: James Munnelly <james@munnelly.eu>

* Allow renewBefore to be set on ACME certificates

Signed-off-by: James Munnelly <james@munnelly.eu>

* Update renewBefore ACME docs. Remove unused fields.

Signed-off-by: James Munnelly <james@munnelly.eu>

* Rename calculateTimeBeforeExpiry to calculateDurationUntilRenew

Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-14 22:30:00 +00:00
jetstack-bot
25c1c126c8
Merge pull request #1052 from munnerz/webhook-panic
Re-enable webhook during e2e tests and fix panic on start
2018-11-07 17:11:46 +00:00
James Munnelly
51d950692c Update pod started checker to tolerate PodCompleted
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:14:57 +00:00
James Munnelly
544507f442 Update gofmt
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 12:39:36 +00:00
jetstack-bot
7292937057
Merge pull request #1010 from munnerz/tiller-e2e-notice
e2e: remove old notice about Tiller addon
2018-10-26 02:07:39 +01:00
James Munnelly
f402c674bb
Update PodStartTimeout
This is to try and reduce test flakes relating to pod start timeouts during e2e's

Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-25 22:55:27 +01:00
James Munnelly
1bec153073 e2e: remove old notice about Tiller addon
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-25 18:58:24 +01:00
jetstack-bot
0d4c45d303
Merge pull request #988 from munnerz/cf-creds
Don't fail e2e's if cloudflare dns01 credentials are not provided
2018-10-23 19:33:01 +01:00
James Munnelly
ca8d4cd085 Add WaitForAllPodsRunningInNamespace function as an addon helper
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 18:45:55 +01:00
James Munnelly
748da93d85 Use --wait flag when installing e2e charts
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 14:48:10 +01:00
James Munnelly
44b588b192 Load cloudflare credentials from environment instead of CLI args
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 14:36:46 +01:00
James Munnelly
5be82139d4 Add SkipError type
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 14:24:38 +01:00
James Munnelly
af2faef241 Fix using Bazel built helm during e2e tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 01:40:08 +01:00
James Munnelly
dc3eedda8f Create Addon as an exported var in addon package
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-19 11:41:11 +01:00
James Munnelly
6fb9858e17 Fix CA issuer ClusterIssuer e2e test
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 15:07:55 +01:00
James Munnelly
8562dfa897 Use unique domains in all HTTP01 and DNS01 tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 14:47:54 +01:00
James Munnelly
f8f4d003ec Add --report-prefix option
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 14:38:45 +01:00
James Munnelly
b60138c082 Fix waiting for test pods to become ready
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 14:19:05 +01:00
James Munnelly
d37a7ecd99 Run helm init --client-only during tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 13:27:05 +01:00
James Munnelly
4665c1c022 Update boilerplate headers
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 13:27:05 +01:00
James Munnelly
ecda543dcb Refactor e2e test framework
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 13:27:05 +01:00
William Lightning
3d09d98bd7 extract rbacClusterRoleHasAccessToResource out of certificate_rbac test to test framework util
Signed-off-by: William Lightning <wlightning@fuelmedical.com>
2018-09-19 10:19:04 -07:00
William Lightning
57bf83dea4 Add basic tests for certificate permissions
Signed-off-by: William Lightning <wlightning@fuelmedical.com>
2018-09-18 14:59:55 -07:00
James Munnelly
db65d6a170 run //hack:update-bazel
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-09-13 11:24:48 +01:00
James Munnelly
51195e4c5f Update license header and add header to every file
Signed-off-by: James Munnelly <james.munnelly@jetstack.io>
2018-08-13 15:53:37 +01:00
Louis Taylor
4601c95557
Use new WaitCertificateIssuedValid everywhere 2018-07-19 16:26:15 +01:00
Louis Taylor
2e97514c5e
Add test 2018-07-06 18:03:02 +01:00
James Munnelly
93ac442206 Increase timeout for wildcard and apex domain e2e test 2018-04-26 12:12:32 +01:00
James Munnelly
676d2f3ea6 Fix e2e test framework and ingress-shim unit tests 2018-04-09 18:33:23 +01:00
James Munnelly
01efbca114 Merge branch 'master' into acmev2 2018-04-04 11:27:37 +01:00
James Munnelly
dd950c8b65 Increase http01 e2e test timeout 2018-03-23 18:50:46 +00:00
James Munnelly
6efc97266d Use pebble instead of boulder in e2e tests 2018-03-23 18:50:45 +00:00
James Munnelly
3322d55424 Update acme e2e testing endpoint 2018-03-23 18:50:44 +00:00
Louis Taylor
f7cdf91626
Create quotas in e2e tests 2018-03-23 17:16:45 +00:00
James Munnelly
827dacc1c0 Ensure certificate is valid for given domains during e2e tests 2018-02-09 20:52:31 +00:00
James Munnelly
f502499288 Optionally write junit reports into artifacts during e2e tests 2018-01-24 12:49:47 +00:00
James Munnelly
228e45e2bb Properly set ACMEURL in e2e tests 2018-01-13 16:07:59 +00:00
James Munnelly
df279f3e63 Add boulder helm chart. Install boulder during e2e tests. 2018-01-13 15:19:48 +00:00
James Munnelly
0706fb8847 Use cert-manager installed via helm in e2e tests
Print pod logs on test failure

Remove old flags from e2e_test makefile target
2017-12-01 18:53:42 +00:00
James Munnelly
70e2a2ec60 Fix check for certificate in ingress-shim e2e 2017-12-01 01:46:27 +00:00
James Munnelly
9d5620a84f Add ingress-shim e2e test 2017-12-01 01:20:20 +00:00
James Munnelly
fa7e052ac1 Move to github.com/jetstack/cert-manager repo 2017-11-03 16:41:39 +00:00
James Munnelly
103cafc77b Fix e2e test imports 2017-11-03 15:09:07 +00:00
James Munnelly
7adab485ff Wait for namespace to no longer exist in AfterEach
Wait longer for acme certificate e2e test

Increase delete namespace timeout
2017-10-16 13:17:10 +01:00
James Munnelly
1f278d659b Refactor e2e setup into scripts. Speed up e2e tests.
Build images whilst services are starting

Exit on setup boulder errors

Install nsenter

Don't build nsenter

Turn up e2e pod verbosity

Set pullPolicy IfNotPresent on HTTP challenge solver
2017-10-16 12:58:47 +01:00
James Munnelly
0ecb17bb6d Add ACME certificate http01 e2e test
Wait for nginx-ingress-controller rc to be installed

Enable minikube ingress addon

Print cert-manager logs after acme certificate test. Properly catch errors.

Move creation of cert-manager pod in e2e tests into framework

Update testingACMEURL

Fix panic

Add test to ensure ACME request fails for invalid domain

Adjust acme certificate failure test

Fix AfterEach steps for acme e2e tests

Don't error on cleanup
2017-10-16 12:58:21 +01:00