ContainerImage.Pinniped/test/integration
Matt Moyer 3efa7bdcc2
Improve our integration test "Eventually" assertions.
This fixes some rare test flakes caused by a data race inherent in the way we use `assert.Eventually()` with extra variables for followup assertions. This function is tricky to use correctly because it runs the passed function in a separate goroutine, and you have no guarantee that any shared variables are in a coherent state when the `assert.Eventually()` call returns. Even if you add manual mutexes, it's tricky to get the semantics right. This has been a recurring pain point and the cause of several test flakes.

This change introduces a new `library.RequireEventually()` that works by internally constructing a per-loop `*require.Assertions` and running everything on a single goroutine (using `wait.PollImmediate()`). This makes it very easy to write eventual assertions.

Signed-off-by: Matt Moyer <moyerm@vmware.com>
2021-06-17 16:56:03 -05:00
..
category_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
cli_test.go Merge branch 'main' into initial_ldap 2021-05-11 11:09:37 -07:00
concierge_api_serving_certs_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
concierge_availability_test.go All controller unit tests should not cancel context until test is over 2021-03-04 17:26:01 -08:00
concierge_client_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
concierge_credentialissuer_test.go Remove an invalid test assertion in TestCredentialIssuer. 2021-06-02 12:05:02 -05:00
concierge_credentialrequest_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
concierge_impersonation_proxy_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
concierge_kubecertagent_test.go Add a new "legacy pod cleaner" controller. 2021-04-26 08:19:45 -06:00
concierge_kubectl_test.go Rename pinniped-server -> pinniped-concierge 2020-10-06 14:59:03 -04:00
e2e_test.go Enable skipping of LDAP int tests when a firewall will block them 2021-05-28 16:13:20 -07:00
kube_api_discovery_test.go Add stub LDAP API type and integration test 2021-04-06 13:10:01 -04:00
kubeclient_test.go Give kubeclient_test some default values for credentialissuer spec 2021-05-19 11:56:54 -07:00
ldap_client_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
rbac_test.go TestServiceAccountPermissions: handle extra permissions on EKS 2021-06-15 11:17:59 -04:00
supervisor_discovery_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
supervisor_healthz_test.go Remove library.AssertNoRestartsDuringTest and make that assertion implicit in library.IntegrationEnv. 2021-03-17 11:18:10 -05:00
supervisor_login_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
supervisor_secrets_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
supervisor_storage_garbage_collection_test.go Improve our integration test "Eventually" assertions. 2021-06-17 16:56:03 -05:00
supervisor_storage_test.go All controller unit tests should not cancel context until test is over 2021-03-04 17:26:01 -08:00
supervisor_upstream_test.go Merge branch 'main' into initial_ldap 2021-05-11 11:09:37 -07:00
whoami_test.go Merge branch 'main' of github.com:vmware-tanzu/pinniped into impersonation-proxy 2021-03-16 14:35:07 -05:00