Skip to content

Commit

Permalink
e2e: wait for k8s resources in e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
burgerdev committed Mar 8, 2024
1 parent e07b139 commit f6268e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion e2e/openssl/openssl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ func TestFrontend2Backend(t *testing.T) {
require.NoError(err)
require.Len(frontendPods, 1, "pod not found: %s/%s", namespace, "openssl-frontend")

require.NoError(c.WaitForPod(ctx, namespace, frontendPods[0].Name))

// Call the backend server from the frontend. If this command produces no TLS error, we verified that
// - the certificate in the frontend pod can be used as a client certificate
// - the certificate in the backend pod can be used as a server certificate
Expand All @@ -63,10 +65,13 @@ func TestFrontend(t *testing.T) {
certs := make(map[string][]byte)

t.Run("contrast verify", func(t *testing.T) {
require := require.New(t)

ctx, cancel := context.WithTimeout(context.Background(), 1*time.Minute)
defer cancel()

require := require.New(t)
require.NoError(c.WaitForDeployment(ctx, namespace, "coordinator"))

coordinator, cancelPortForward, err := c.PortForwardPod(ctx, namespace, "port-forwarder-coordinator", "1313")
require.NoError(err)
defer cancelPortForward()
Expand Down

0 comments on commit f6268e1

Please sign in to comment.