internal/oidc/dynamiccodec: loosen test to reduce flakes

When we try to decode with the wrong decryption key, we could get any number of
error messages, depending on what failure mode we are in (couldn't authenticate
plaintext after decryption, couldn't deserialize, etc.). This change makes the
test weaker, but at least we know we will get an error message in the case where
the decryption key is wrong.

Signed-off-by: Andrew Keesler <akeesler@vmware.com>
This commit is contained in:
Andrew Keesler 2020-12-11 11:46:24 -05:00
parent e17bc31b29
commit e2aad48852
No known key found for this signature in database
GPG Key ID: 27CE0444346F9413
1 changed files with 1 additions and 1 deletions

View File

@ -74,7 +74,7 @@ func TestCodec(t *testing.T) {
keys: func(encoderSigningKey, encoderEncryptionKey, decoderSigningKey, decoderEncryptionKey *[]byte) {
*encoderEncryptionKey = []byte("16-byte-no-match")
},
wantDecoderError: "securecookie: error - caused by: securecookie: error - caused by: invalid character '",
wantDecoderError: "securecookie: error - caused by: securecookie: error - caused by: ",
},
}
for _, test := range tests {