Commit Graph

54 Commits

Author SHA1 Message Date
Tim Ramlot
4c94f3ef10
create ad-hoc schemes instead of sharing global ones
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-11-06 21:58:24 +01:00
Tim Ramlot
7098c25a55
move e2e framework back to e2e module
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-07-07 19:26:10 +02:00
irbekrm
97a3eb8697 Makes test framework accessible externally
Signed-off-by: irbekrm <irbekrm@gmail.com>
2023-05-10 12:09:35 +01:00
Tim Ramlot
42e6282d02
use cluster-wide shared Vault instance
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-04-28 13:05:18 +02:00
Tim Ramlot
7c037f2912
optimise QPS, Burst and concurrent-workers values for faster e2e tests
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2023-04-11 14:51:18 +02:00
Ashley Davis
6ce6ae839e
separate binaries/tests into separate modules with minimal dependencies
also add gomod validation in CI, along with a cmrel version bump

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2023-04-05 10:30:39 +01:00
Tim Ramlot
836793e7e3 upgrade gateway api to v0.5.0
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-08-08 08:52:59 +00:00
Tim Ramlot
9897f2355c upgrade ginkgo to v2
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-08-04 10:16:29 +00:00
Tim Ramlot
f6a381d247 replace 'github.com/onsi/ginkgo' with 'github.com/onsi/ginkgo/v2'
Signed-off-by: Tim Ramlot <42113979+inteon@users.noreply.github.com>
2022-08-03 15:28:23 +00:00
irbekrm
cdaeb0599a Removes the creation of the unused test istio GatewayClass
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-12 16:13:06 +00:00
Jake Sanders
c96d91d586
Update the sig-network Gateway API support to v1alpha2
Co-authored-by: Joakim Ahrlin <joakim.ahrlin@gmail.com>
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2022-03-01 15:05:17 +00:00
Ashley Davis
3a055cc2f5
rename all uses of github.com/jetstack/cert-manager
This was done by running the following command twice:

 ```bash
 grep -Ri "github.com/jetstack/cert-manager" . | \
 cut -d":" -f1 | \
 sort | \
 uniq | \
 xargs sed -i
 "s/github.com\/jetstack\/cert-manager/github.com\/cert-manager\/cert-manager/"
 ```

Signed-off-by: Ashley Davis <ashley.davis@jetstack.io>
2022-02-02 09:08:31 +00:00
Maël Valais
1cd44fa730 gateway-shim: conformance: a cert should get created for a Gateway
Signed-off-by: Maël Valais <mael@vls.dev>
2021-07-15 20:34:50 +02:00
Richard Wall
3d7f370b21 Re-enable the cainjector E2E tests for apiregistration
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-04-06 14:04:26 +01:00
Maartje Eyskens
ab0cd57dc5 Use The cert-manager Authors.
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-11 19:04:13 +01:00
Maartje Eyskens
1788a9d758 Update copyright to cert-manager project
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-08 19:04:49 +01:00
Richard Wall
a70298180a Run a script to update v1alpha2 usage to v1
Script is available at https://github.com/jetstack/cert-manager/pull/3201

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:26:51 +01:00
James Munnelly
881b886049 Update Kubernetes API client call-sites
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-26 12:58:50 +00:00
JoshVanL
7a1620a632
Adds a duration gap for the app role Vault e2e issuer test
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-03-10 13:18:44 +00:00
James Munnelly
4fd0a7a89f e2e: don't wait for test namespace to be deleted before proceeding
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-06 20:47:17 +00:00
JoshVanL
bcd94fc2f1 e2e: Adds fuz to cert duration check and fix waiting for cert unready
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-09-26 17:35:01 +01:00
James Munnelly
58754abf37 Refactor codebase for v1alpha2
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-09-20 16:22:43 +01:00
JoshVanL
98d5725eea WIP, add CertificateRequest e2e tests
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2019-07-03 15:59:05 +01:00
jetstack-bot
be95598d20
Merge pull request #1505 from DirectXMan12/feature/certs-in-conv-webhook
Add support for CRDs to the CA injector
2019-07-03 12:27:31 +01:00
Solly Ross
8155ed71b5 Expand/generalize CA injector tests
This expands/generalizes the CA injector tests to all object types that
the CA injector supports.

Signed-off-by: Solly Ross <sollyross@google.com>
2019-06-19 16:09:31 -07:00
James Munnelly
bfcac2b257 Fix loggableAddon interface in test framework
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-06-18 13:48:10 +01:00
James Munnelly
3948175427 Fix e2e test addon deprovisioning order
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-04-30 12:36:18 +01:00
Solly Ross
42248a91d7 CA Injector Controller
This implements a CA injector controller using controller-runtime.
It looks at admission webhooks and APIServices with a particular
annotation, and injects the CA data from certificates.

Signed-off-by: Solly Ross <sollyross@google.com>
2019-02-26 21:47:34 -08:00
James Munnelly
31eeb5fe2a Refactor WaitCertificateValidTLS and run kubectl describe on test failure
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-31 22:25:46 +00:00
James Munnelly
8533a5b91c Use log.Logf instead of GinkgoWriter
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-08 14:55:27 +00:00
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
0fcc0c666c Update copyright header year
Signed-off-by: James Munnelly <james@munnelly.eu>
2019-01-07 15:07:55 +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
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
5be82139d4 Add SkipError type
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-23 14:24:38 +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
ecda543dcb Refactor e2e test framework
Signed-off-by: James Munnelly <james@munnelly.eu>
2018-10-18 13:27:05 +01: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
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
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