Commit Graph

189 Commits

Author SHA1 Message Date
James Munnelly
016ae6077f Print test namespace name at the start of all test specs
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 22:16:33 +00:00
James Munnelly
2d55a8fa26 Use framework/log instead of glog
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 22:14:04 +00:00
James Munnelly
e3e5612f95 Place global logs in log/ subdir
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 20:48:11 +00:00
James Munnelly
e46837f64c Replace calls to glog with GinkgoWriter
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 20:47:58 +00:00
James Munnelly
60e6755f3f Move util testing package into e2e/util
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 20:45:45 +00:00
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
6b76983165 Bump cert-manager verbosity during e2e tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 20:45:44 +00:00
James Munnelly
f4291d5876 Add missing call to GinkgoWriter.Write for global addon logs
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
07a137738b Fix helm chart verification lib
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-12-04 16:20:00 +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
b2dead1943 Fix potential race in e2e duration checking
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-28 21:30:20 +00:00
jetstack-bot
76f2eaff24
Merge pull request #1109 from munnerz/logs-on-failure
Print pod logs on e2e test case failure
2018-11-28 01:25:28 +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
James Munnelly
4232041710 Use test builder in ingress-shim units and fix tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-26 17:07:00 +00:00
jetstack-bot
9975ff4a8a
Merge pull request #1075 from gparvin/adding-not-after-to-certificate-status
changes to add a NotAfter field to the cert status
2018-11-16 10:11:01 +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
Gus Parvin
aceb997032 possible timing issue with the e2e test and the NotAfter status field
Signed-off-by: Gus Parvin <gparvin@us.ibm.com>
2018-11-14 16:34:52 +00:00
James Munnelly
93e886dfaa Fix v1alpha3 kind config
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 19:32:02 +00:00
James Munnelly
ed5ff98c9e Use appropriate kubeadm config version for kubernetes version
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-13 17:37:50 +00:00
Gus Parvin
7e33256b68 changes to add a NotAfter field to the cert status
Signed-off-by: Gus Parvin <gparvin@us.ibm.com>
2018-11-13 16:16:29 +00:00
James Munnelly
78f1718b86 Bump config template and kind image
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-09 11:47:34 +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
jetstack-bot
814a1d7d8e
Merge pull request #1012 from munnerz/e2e-crt-algo
Add e2e test verifying we can obtain ECDSA keys from RSA CA issuers
2018-11-07 16:47:45 +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
719dd915d1 Re-enable webhook during e2e tests and fix panic on start
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 16:06:49 +00:00
James Munnelly
544507f442 Update gofmt
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 12:39:36 +00:00
James Munnelly
cf402848b9 Add RSA/ECDSA unit tests for CA issuer
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:14:54 +00:00
James Munnelly
e7fd05ddea Add e2e test verifying we can obtain ECDSA keys from RSA CA issuers
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 11:14:54 +00:00
James Munnelly
17563ee1a1 Add Certificate and Issuer unit gen functions
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-07 09:56:09 +00:00
jetstack-bot
ac80ed82f1
Merge pull request #1046 from munnerz/logs-pkg
Revert "Remove pkg/logs package"
2018-11-07 09:48:55 +00:00
James Munnelly
175e90c158 Revert "Remove pkg/logs package"
This reverts commit b6f854f849.

Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-06 20:05:32 +00:00
James Munnelly
85d433cff9 Add ACME challenge scheduler and process challenges for matching domains/types in serial
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-11-06 12:31:16 +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
3e7afa1b1f Make it easier for DNS01 tests to be re-used between providers
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-19 11:41:19 +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
ecc225ae76 Remove default SkipString
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-19 11:17:25 +01:00
James Munnelly
d9d0a25a55 Fix DNSProvider setting BaseDomain
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 15:17:52 +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