Commit Graph

103 Commits

Author SHA1 Message Date
Maartje Eyskens
1cd5c381b9 Fix boilerplate
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-25 14:56:08 +02:00
Maartje Eyskens
627b57fed5 Add validation for CR creation only to match Key usages with the CSR if both are set
Signed-off-by: Maartje Eyskens <maartje@eyskens.me>
2020-08-25 14:38:57 +02:00
Richard Wall
3fb3db27ff Fix ACME challenge type in unit tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
b638954b03 Fix ./cmd/ctl and tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +01:00
Richard Wall
81eb53f597 ./hack/update-all.sh
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-20 14:28:06 +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
Haoxiang Zhou
6c26e0d821 Add Challenge output and update tests
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-17 16:15:28 +02: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
Richard Wall
8beeac1187 Rename Certificate.Spec.URISANs to URIs and EmailSANs to EmailAddresses
For consistency with DNSNames and IPAddresses
And for consistency with https://golang.org/pkg/crypto/x509/#Certificate

Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-14 17:02:53 +01:00
Richard Wall
887bd5b730 Update integration tests
Signed-off-by: Richard Wall <richard.wall@jetstack.io>
2020-08-14 11:15:21 +01: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
jetstack-bot
e1791b0b0e
Merge pull request #3154 from hzhou97/add_order_output
Ctl command `status certificate`: Add order output
2020-08-12 14:13:59 +01:00
Haoxiang Zhou
43a83e71d7 Use line anchors for exact regex matching instead of string comparison
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 16:37:18 +01:00
Haoxiang Zhou
196959a05f No output about Orders if non-ACME Issuer
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 14:37:54 +01:00
jetstack-bot
497e64de4b
Merge pull request #3151 from JoshVanL/fix-external-issuer
Adds Issuer Group to Secret annotation
2020-08-06 13:58:32 +01:00
JoshVanL
30ff597f15
Refactor issuer controller integration test to ensure Secret is updated
in single update

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-06 13:30:15 +01:00
Haoxiang Zhou
fc8b123593 Update tests and compare strings directly as well if regex matches
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-06 12:03:36 +01:00
JoshVanL
49ee468161
Adds integration test for issuer controller secret annotations, and
fixes GenerateTempalate func

Signed-off-by: JoshVanL <vleeuwenjoshua@gmail.com>
2020-08-06 11:08:13 +01:00
Haoxiang Zhou
6afc1d6cfa Change status cert to use structs
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-08-03 11:19:13 +01:00
Haoxiang Zhou
11b6d91722 Use go-diff to report error
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-30 18:04:08 +01:00
Haoxiang Zhou
ef95d15642 Updated tests with output for secret
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-30 17:54:57 +01:00
jetstack-bot
ec6d2bb3e5
Merge pull request #3120 from hzhou97/add_issuer_output
Ctl status certificate command: Add issuer output and creation time
2020-07-29 12:13:20 +01:00
jetstack-bot
8434c6a941
Merge pull request #3094 from hzhou97/create_cr_new_test
Create cr command: change and add integration tests
2020-07-27 15:56:14 +01:00
Haoxiang Zhou
0d449ea76d Add tests for non-existing issuer; Review implementation
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-27 14:20:49 +01:00
Haoxiang Zhou
3b6b725c5d Added Certificate creation time to output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-24 16:03:29 +01:00
Haoxiang Zhou
c4f7e27413 Add Issuer/ClusterIssuer output
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-24 15:32:34 +01:00
Haoxiang Zhou
d65e95eaeb Refactor TestCtlCreateCRBehaviourBeforeAnythingIsCreated to unit tests
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 16:51:48 +01:00
Haoxiang Zhou
8525a26bd2 Format the Events output with tabwriter
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 12:31:37 +01:00
Haoxiang Zhou
f95251a5da Output Events of CR as well
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
20c5e2696b Output the Events of Certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-22 09:45:17 +01:00
Haoxiang Zhou
f061f15e93 Review implementations
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-21 15:57:02 +01:00
Haoxiang Zhou
2ae27cb86f Move check of Validate function to from integration to unit tests, minor clean-up
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-17 17:48:02 +01:00
Haoxiang Zhou
8b89873199 Smaller review implementations
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-17 13:53:39 +01:00
jetstack-bot
48eb68dd79
Merge pull request #3090 from hzhou97/add_cr_output
Ctl command status certificate: Add CR output
2020-07-16 10:31:48 +01:00
Haoxiang Zhou
179988b545 Change test to fit rebase
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-13 10:29:10 +01:00
Haoxiang Zhou
6b303bd0a4 Cleanup: pull out test struct
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-13 10:02:43 +01:00
Haoxiang Zhou
ed92649644 Clean-up, moving test cases, comments
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-13 10:02:43 +01:00
Haoxiang Zhou
f9469c6c2f Check if err is as expected; Split into three functions for more granular testing
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-13 10:02:43 +01:00
Haoxiang Zhou
8eed27b664 Updated tests after rebasing broke them
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 15:50:12 +01:00
Haoxiang Zhou
3cdce59fbe Set condition on CR for test
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 14:00:52 +01:00
Haoxiang Zhou
f5ebea1b27 Basic output for CR owned by Cert
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:54:41 +01:00
Haoxiang Zhou
375525976f Update bazel dependencies
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:34:27 +01:00
Haoxiang Zhou
864bb3ab59 Command output to stderr, check both ready condition and length of status.certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
d6b7906267 Clean-up and comments in test
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
c2d8f6ce7d Test also checks status.certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
5fbae66d26 Use wait.Poll and inline setting CR status
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
c2c62fe124 Added flag to specify timeout when waiting on certificate
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
Haoxiang Zhou
b2f347d115 Add test for fetching
Signed-off-by: Haoxiang Zhou <haoxiang.zhou@jetstack.io>
2020-07-10 13:23:52 +01:00
jetstack-bot
d4a7dfa730
Merge pull request #3026 from hzhou97/status_command
Basic `status certificate` ctl command
2020-07-10 11:07:08 +01:00