Commit Graph

32 Commits

Author SHA1 Message Date
Richard Wall
4eedf4fcfd Test conversion code using sample CRDs and remove conversion configuration from cert-manager CRDs
* Generate CRDs for the sample API types
* Allow alternative CRDs to be loaded into the envtest API server
* Override the conversion configuration of the CRDs
* Show webhook server logs in tests
* Simplify the loading of the test API CRDs
* Allow the ConversionHandler to be overridden in tests

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-12-14 17:33:22 +00:00
Michele Caci
ac4bf927c2 Remove t.Fatal from goroutine
Signed-off-by: Michele Caci <michele.caci@amadeus.com>
2021-10-19 12:53:46 +02:00
irbekrm
81bdabf67a Code review feedback
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-09-30 17:23:42 +01:00
irbekrm
5ff6e2d789 Changes required to use envtest from controller-runtime v0.10
Environment.CRDs is now a slice of apiextensionsv1.CustomResourceDefinitions instead of client.Object https://github.com/kubernetes-sigs/controller-runtime/pull/1626#discussion_r684454763

Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-09-30 10:13:29 +01:00
Richard Wall
481fc5e43a Force the "served: true" in the CRDs when used in integration tests
These tests still need to create legacy API versions.

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2021-09-29 14:32:35 +01:00
Eng Zer Jun
54e70d2cc4
refactor: move from io/ioutil to io and os package
The io/ioutil package has been deprecated in Go 1.16. This commit
replaces the existing io/ioutil functions with their new definitions in
io and os packages.

Signed-off-by: Eng Zer Jun <engzerjun@gmail.com>
2021-08-23 19:50:42 +08:00
Inteon
91ec4c773a
use correct contexts everywhere & don't restart apiserver to add crds
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-12 20:05:01 +02:00
Inteon
8ec405e823
fail if stop was not successful
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-07 00:17:02 +02:00
Inteon
a569e79776
cleanup test contexts
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-06 17:31:19 +02:00
joshvanl
d261e2eadb Defined AdmissionReviewVersions:[]string{"v1"} in API webhook
configuration integration tests

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-29 14:54:17 +01:00
joshvanl
58519e442a Change admissionregistration.k8s.io v1beta1 to v1 in integration tests
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-07-26 16:26:45 +01:00
Inteon
cd92bf321f
centralise testing api-server & remove custom implementation
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-07-06 16:13:44 +02:00
Tamal Saha
7b63788f52 Cleanup codegen script
Signed-off-by: Tamal Saha <tamal@appscode.com>
2021-05-17 08:11:19 -07:00
Tamal Saha
b1cb6422e4 Use controller-runtime v0.9.0-beta.0
Signed-off-by: Tamal Saha <tamal@appscode.com>
2021-05-17 08:11:19 -07:00
joshvanl
109b3e0b28 Rename Wehook's API server host flag from --master to --api-server-host
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-26 17:26:28 +00:00
joshvanl
f640f64fcb Update integration test framework to restart the API to share the
address with the webhook

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2021-03-26 17:26:28 +00:00
jetstack-bot
cdc53b65cb
Merge pull request #3500 from meyskens/update-copy
Update copyright to cert-manager project
2020-12-15 10:12:31 +00: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
Maartje Eyskens
3a2f02f0e3 Fix old CRD reference
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-12-02 15:01:17 +01:00
Mateusz Gozdek
8fc98a4422
test/integration/framework: simplify to avoid word "datas"
As it is being treated as a typo by codespell.

Signed-off-by: Mateusz Gozdek <mgozdekof@gmail.com>
2020-11-07 14:53:55 +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
Maartje Eyskens
501940c468 update deps
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-14 19:25:15 +02:00
Maartje Eyskens
614d8496ad Update int test server
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-14 19:25:15 +02:00
Maartje Eyskens
5049c1a4ab Improve integration tests with OpenAPI + webhook validation
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-13 15:01:50 +02:00
James Munnelly
1ec1a07b72 surpress control plane output during integration tests
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-23 16:48:33 +01:00
James Munnelly
97b33abf11 Add missing boilerplate headers
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 12:27:25 +01:00
James Munnelly
85cc080d79 Add trigger controller integration test
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 12:26:53 +01:00
James Munnelly
e88aab9953 Split with newlines
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-07 14:35:51 +01:00
James Munnelly
3f9c031f5d Update integration & unit tests for new CRD generation
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-01 18:22:35 +01:00
Maartje Eyskens
2236d1a271 Patch issue where runtime.Object is needed
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-03-13 15:51:14 +01:00
James Munnelly
4e5f9bc31d Add integration testing framework and a basic conversion test
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-03-13 15:32:50 +01:00