cert-manager / cert-manager

Automatically provision and manage TLS certificates in Kubernetes
https://cert-manager.io
Apache License 2.0
11.9k stars 2.05k forks source link

Venafi unit-test are flakey when run via make #5078

Closed wallrj closed 1 year ago

wallrj commented 2 years ago

The venafi unit-tests failed in CI. But passed locally for me:

$ go test ./pkg/controller/certificaterequests/venafi -v
...
--- PASS: TestSign (2.62s)
    --- PASS: TestSign/tpp:_if_fail_to_build_client_based_on_missing_secret_then_return_nil_and_hard_fail (0.16s)
    --- PASS: TestSign/tpp:_if_fail_to_build_client_based_on_secret_lister_transient_error_then_return_err_and_set_pending (0.16s)
    --- PASS: TestSign/cloud:_if_fail_to_build_client_based_on_missing_secret_then_return_nil_and_hard_fail (0.16s)
    --- PASS: TestSign/should_exit_nil_and_set_status_pending_if_referenced_issuer_is_not_ready (0.16s)
    --- PASS: TestSign/annotations:_Custom_Fields (0.17s)
    --- PASS: TestSign/annotations:_Error_on_invalid_JSON_in_custom_fields (0.16s)
    --- PASS: TestSign/annotations:_Error_on_invalid_type_in_custom_fields (0.16s)
    --- PASS: TestSign/tpp:_if_sign_returns_cert_then_return_cert_and_not_failed (0.17s)
    --- PASS: TestSign/a_CertificateRequest_with_a_denied_condition_should_update_Ready_condition_with_'Denied' (0.16s)
    --- PASS: TestSign/cloud:_if_fail_to_build_client_based_on_secret_lister_transient_error_then_return_err_and_set_pending (0.16s)
    --- PASS: TestSign/tpp:_if_sign_returns_pending_error_then_set_pending_and_return_err (0.16s)
    --- PASS: TestSign/tpp:_if_sign_returns_generic_error_then_set_pending_and_return_error (0.16s)
    --- PASS: TestSign/cloud:_if_sign_returns_generic_error_then_set_pending_and_return_error (0.16s)
    --- PASS: TestSign/cloud:_if_sign_returns_cert_then_return_cert_and_not_failed (0.16s)
    --- PASS: TestSign/a_CertificateRequest_without_an_approved_condition_should_do_nothing (0.16s)
    --- PASS: TestSign/cloud:_if_sign_returns_pending_error_then_set_pending_and_return_err (0.16s)
I0427 10:55:30.386692   85076 watch.go:183] Stopping fake watcher.
PASS
I0427 10:55:30.386762   85076 reflector.go:225] Stopping reflector *v1.ClusterIssuer (10ms) from pkg/mod/k8s.io/client-go@v0.23.4/tools/cache/reflector.go:167
I0427 10:55:30.386794   85076 watch.go:183] Stopping fake watcher.
ok      github.com/cert-manager/cert-manager/pkg/controller/certificaterequests/venafi  2.678s
$ make test WHAT=./pkg/controller/certificaterequests/venafi
Latest known tag for integration tests is v1.7.1; if that seems out-of-date,
pull latest tags, run 'rm bin/scratch/git/upstream-tags.txt' and retest
CGO_ENABLED=0 ./bin/tools/gotestsum -- ./pkg/controller/certificaterequests/venafi
✓  pkg/controller/certificaterequests/venafi (cached)

DONE 17 tests in 1.286s

After a couple of retests they passed.

Originally posted by @wallrj in https://github.com/cert-manager/cert-manager/issues/5051#issuecomment-1110808774

jetstack-bot commented 2 years ago

Issues go stale after 90d of inactivity. Mark the issue as fresh with /remove-lifecycle stale. Stale issues rot after an additional 30d of inactivity and eventually close. If this issue is safe to close now please do so with /close. Send feedback to jetstack. /lifecycle stale

jetstack-bot commented 2 years ago

Stale issues rot after 30d of inactivity. Mark the issue as fresh with /remove-lifecycle rotten. Rotten issues close after an additional 30d of inactivity. If this issue is safe to close now please do so with /close. Send feedback to jetstack. /lifecycle rotten /remove-lifecycle stale

jetstack-bot commented 1 year ago

Rotten issues close after 30d of inactivity. Reopen the issue with /reopen. Mark the issue as fresh with /remove-lifecycle rotten. Send feedback to jetstack. /close

jetstack-bot commented 1 year ago

@jetstack-bot: Closing this issue.

In response to [this](https://github.com/cert-manager/cert-manager/issues/5078#issuecomment-1257221259): >Rotten issues close after 30d of inactivity. >Reopen the issue with `/reopen`. >Mark the issue as fresh with `/remove-lifecycle rotten`. >Send feedback to [jetstack](https://github.com/jetstack). >/close Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.