diff --git a/src/test/e2e/21_connect_creds_test.go b/src/test/e2e/21_connect_creds_test.go index ea4c88c085..c58244a736 100644 --- a/src/test/e2e/21_connect_creds_test.go +++ b/src/test/e2e/21_connect_creds_test.go @@ -25,6 +25,9 @@ func TestConnectAndCreds(t *testing.T) { t.Log("E2E: Connect") ctx := context.Background() + prevAgentSecretData, _, err := e2e.Kubectl(t, "get", "secret", "agent-hook-tls", "-n", "zarf", "-o", "jsonpath={.data}") + require.NoError(t, err) + c, err := cluster.NewCluster() require.NoError(t, err) // Init the state variable @@ -36,9 +39,11 @@ func TestConnectAndCreds(t *testing.T) { stdOut, stdErr, err := e2e.Zarf(t, "tools", "update-creds", "--confirm") require.NoError(t, err, stdOut, stdErr) + newAgentSecretData, _, err := e2e.Kubectl(t, "get", "secret", "agent-hook-tls", "-n", "zarf", "-o", "jsonpath={.data}") + require.NoError(t, err) newState, err := c.LoadZarfState(ctx) require.NoError(t, err) - + require.NotEqual(t, prevAgentSecretData, newAgentSecretData) require.NotEqual(t, oldState.ArtifactServer.PushToken, newState.ArtifactServer.PushToken) require.NotEqual(t, oldState.GitServer.PushPassword, newState.GitServer.PushPassword) diff --git a/src/test/e2e/99_appliance_remove_test.go b/src/test/e2e/99_appliance_remove_test.go index 3b640b3721..1cd25d41e4 100644 --- a/src/test/e2e/99_appliance_remove_test.go +++ b/src/test/e2e/99_appliance_remove_test.go @@ -36,15 +36,6 @@ func TestApplianceRemove(t *testing.T) { stdOut, stdErr, err = e2e.Zarf(t, "init", "--components=k3s", "--confirm") require.NoError(t, err, stdOut, stdErr) - // Test update creds still works without a git server existing - prevAgentSecretData, _, err := e2e.Kubectl(t, "get", "secret", "agent-hook-tls", "-n", "zarf", "-o", "jsonpath={.data}") - require.NoError(t, err) - _, _, err = e2e.Zarf(t, "tools", "update-creds", "--confirm") - require.NoError(t, err) - newAgentSecretData, _, err := e2e.Kubectl(t, "get", "secret", "agent-hook-tls", "-n", "zarf", "-o", "jsonpath={.data}") - require.NoError(t, err) - require.NotEqual(t, prevAgentSecretData, newAgentSecretData) - // Destroy the cluster to test Zarf cleaning up after itself stdOut, stdErr, err = e2e.Zarf(t, "destroy", "--confirm") require.NoError(t, err, stdOut, stdErr)