Skip to content

Commit

Permalink
Merge pull request #1932 from vmware-tanzu/ben/fuzzing-error-message
Browse files Browse the repository at this point in the history
Improve Fuzzing error message to remind us to update storage versions
  • Loading branch information
joshuatcasey authored May 2, 2024
2 parents 879b840 + e6cb439 commit 545df75
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -428,7 +428,13 @@ func TestFuzzAndJSONNewValidEmptyAuthorizeCodeSession(t *testing.T) {
// cause those old session Secrets to be discarded upon read after an upgrade.
// Note that when you change the storage version, you will also need to change it in the JSON content of the
// expected value for this assertion.
require.JSONEq(t, ExpectedAuthorizeCodeSessionJSONFromFuzzing, authorizeCodeSessionJSONFromFuzzing, "actual:\n%s", authorizeCodeSessionJSONFromFuzzing)
require.JSONEq(t,
ExpectedAuthorizeCodeSessionJSONFromFuzzing,
authorizeCodeSessionJSONFromFuzzing,
"actual:\n%s\n\n(NOTICE: This test may fail when storage structure is updated. "+
"Be sure to update relevant version variables (authorizeCodeStorageVersion, oidcStorageVersion, pkceStorageVersion, "+
"refreshTokenStorageVersion, accessTokenStorageVersion) to a new value and leave a comment documenting the change. "+
"Updating the version ensures new secret generation, therefore smooth upgrades of Pinniped.)", authorizeCodeSessionJSONFromFuzzing)
}

func TestReadFromSecret(t *testing.T) {
Expand Down

0 comments on commit 545df75

Please sign in to comment.