Commit Graph

31 Commits

Author SHA1 Message Date
irbekrm
8e81e01932 Adds an integration test for exponential backoff
Signed-off-by: irbekrm <irbekrm@gmail.com>
2022-03-21 07:33:51 +00:00
joshvanl
a8909f9b91 Update integration tests for passing field manager. Add integration
tests for certificate condition field open api tags

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-02-11 16:15:56 +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
joshvanl
38b7b930c8 Add tests from rebase and more policies under
/internal/controller/certificates

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-19 14:31:05 +00:00
joshvanl
3b148347ad Move temporary certificate policy init into policy package
Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-19 14:30:00 +00:00
joshvanl
f1cafae95f Refactor trigger policies to be more generic and be used by multiple
controllers

Signed-off-by: joshvanl <vleeuwenjoshua@gmail.com>
2022-01-19 14:30:00 +00: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
a569e79776
cleanup test contexts
Signed-off-by: Inteon <42113979+inteon@users.noreply.github.com>
2021-08-06 17:31:19 +02:00
kit837
0f97e6d19d pass in clock.Clock for better test
Signed-off-by: kit837 <66801824+kit837@users.noreply.github.com>
2021-06-15 17:48:20 +00:00
irbekrm
e6b748047d Remove the default renewBefore value
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-06-11 10:03:12 +01:00
Lars Lehtonen
635dc187f5
test/integration/certificates: fix dropped error
Signed-off-by: Lars Lehtonen <lars.lehtonen@gmail.com>
2021-04-12 05:45:57 -07:00
Maël Valais
71e707387a trigger-controller: refactor test, inject gatherer and policychain
Injecting the whole Gatherer struct was not necessary for testing
since DataForCertificate is now fully unit-tested. With that, we
can mock the Gatherer.Evaluate function. Since there is no reason
to inject a full Gatherer object into the trigger controller, I chose
to inject a simple policies.Func. I named the function "shouldReissue"
since this is exactly what this function does.

I also refactored the test cases to use the same gen.Certificate
that we use in the rest of the codebase.

Signed-off-by: Maël Valais <mael@vls.dev>
2021-03-23 13:55:11 +01:00
irbekrm
a89133b637 Better wording and wrap long comment lines.
Co-authored-by: Maël Valais <mael@vls.dev>
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-03-15 08:48:23 +00:00
irbekrm
8d5059b13e Updates Trigger controller integration tests
Signed-off-by: irbekrm <irbekrm@gmail.com>
2021-03-15 08:47:42 +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
e0749ad822 Implement feedback
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-27 13:02:18 +02:00
Maartje Eyskens
0f6bc5eb68 Move NS creation to individual tests
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-26 14:18:26 +02: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
9e2d6a514b Move expcertificates into certificates package
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-07-01 12:16:25 +01:00
James Munnelly
dc01fa2394 add integration test for certificate renewal
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-23 16:48:33 +01:00
James Munnelly
fe51a02227 use status.renewalTime in trigger policies and correctly plumb through clock
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-06-23 16:37:50 +01:00
JoshVanL
e465329b80
Revert vault free port and expose listener port from metrics server
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-26 23:01:55 +01:00
JoshVanL
fac8c30211
Ensures that integration tests use a free/or random port to start the
metrics server. Tests that do not depend on metrics, do not actually
start the server. Creates a shared test "FreePort" func. Fixes context
placement.

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-21 10:48:55 +01:00
JoshVanL
3e7f7eb87e
Expose Prometheus listen address as a controller command line flag
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-18 18:21:03 +01:00
JoshVanL
e936d2242c
Adds integration test for new metrics controller
Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-05-18 17:45:12 +01:00
James Munnelly
53fa3b70ab Move trigger policies into separate package
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-20 15:08:31 +01:00
James Munnelly
cf7e344425 Export PolicyChain type
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 15:14:46 +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
1fc9981359 Fix up use of Kubernetes clientset after rebase
Signed-off-by: James Munnelly <james@munnelly.eu>
2020-04-15 12:27:15 +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