Skip to content

Commit

Permalink
move test back
Browse files Browse the repository at this point in the history
Signed-off-by: Austin Abro <[email protected]>
  • Loading branch information
AustinAbro321 committed Aug 19, 2024
1 parent 77cc4ec commit 6057e9f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
7 changes: 6 additions & 1 deletion src/test/e2e/21_connect_creds_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)

Expand Down
9 changes: 0 additions & 9 deletions src/test/e2e/99_appliance_remove_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down

0 comments on commit 6057e9f

Please sign in to comment.