Skip to content

Commit

Permalink
Update test
Browse files Browse the repository at this point in the history
  • Loading branch information
diogomatsubara committed Aug 8, 2023
1 parent b54b482 commit 479c6e2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/api/v1/router_server_secrets_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,13 +67,14 @@ func TestIntegrationServerCredentialsUpsert(t *testing.T) {
assert.NotEqual(t, "mynewSecret!", secret.Password)

// Update the secret
_, err = s.Client.SetCredential(ctx, uuid, slug, "postgre", "mynewSecret!")
_, err = s.Client.SetCredential(ctx, uuid, slug, "foobar", "mynewSecret!")
assert.NoError(t, err)

// Get the new secret
newSecret, _, err := s.Client.GetCredential(ctx, uuid, slug)
assert.NoError(t, err)
assert.Equal(t, "mynewSecret!", newSecret.Password)
assert.Equal(t, "foobar", newSecret.Username)
// ensure timestamps were updated correctly
assert.Equal(t, secret.CreatedAt, newSecret.CreatedAt)
assert.NotEqual(t, newSecret.UpdatedAt, secret.UpdatedAt)
Expand Down

0 comments on commit 479c6e2

Please sign in to comment.