Skip to content

Commit

Permalink
update tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hooksie1 committed Aug 10, 2024
1 parent 3d89530 commit 76cf52c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions service/rotate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ var (
"piggybank.secrets.secret1": "thesecret",
"piggybank.secrets.secret2": "other secret",
"piggybank.secrets.secret3": "this is another secret $@!)(*)/",
"piggybank.secrets.secret4": "piggybank rules",
}
)

Expand Down Expand Up @@ -119,6 +120,7 @@ func TestRotation(t *testing.T) {
"piggybank.secrets.secret1": "thesecret",
"piggybank.secrets.secret2": "other secret",
"piggybank.secrets.secret3": "",
"piggybank.secrets.secret4": "piggybank rules",
},
err: true,
},
Expand Down Expand Up @@ -150,7 +152,7 @@ func TestRotation(t *testing.T) {
t.Fatal(err)
}

for sub, val := range v.vals {
for sub := range v.vals {
record := JetStreamRecord{
bucket: piggyBucket,
key: sub,
Expand All @@ -161,7 +163,7 @@ func TestRotation(t *testing.T) {
}

if string(decrypted) != v.expected[sub] {
t.Errorf("expected %s but got %s", val, string(decrypted))
t.Errorf("expected %s but got %s", v.expected[sub], string(decrypted))
}
}

Expand Down

0 comments on commit 76cf52c

Please sign in to comment.