server: fix tests to expect unpadded base64 messages

Signed-off-by: Pavel Borzenkov <pavel.borzenkov@gmail.com>
This commit is contained in:
Pavel Borzenkov 2016-11-23 20:02:19 +03:00
parent abd6805f1c
commit f76c43ec4f

View file

@ -810,7 +810,7 @@ func TestHandleKeysFunc(t *testing.T) {
t.Fatalf("Incorrect headers: want=%#v got=%#v", wantHeader, gotHeader) t.Fatalf("Incorrect headers: want=%#v got=%#v", wantHeader, gotHeader)
} }
wantBody := `{"keys":[{"kid":"1234","kty":"RSA","alg":"RS256","use":"sig","e":"AQAB","n":"FE9chh46rg=="},{"kid":"5678","kty":"RSA","alg":"RS256","use":"sig","e":"AQAB","n":"BGKVohEShg=="}]}` wantBody := `{"keys":[{"kid":"1234","kty":"RSA","alg":"RS256","use":"sig","e":"AQAB","n":"FE9chh46rg"},{"kid":"5678","kty":"RSA","alg":"RS256","use":"sig","e":"AQAB","n":"BGKVohEShg"}]}`
gotBody := w.Body.String() gotBody := w.Body.String()
if wantBody != gotBody { if wantBody != gotBody {
t.Fatalf("Incorrect body: want=%s got=%s", wantBody, gotBody) t.Fatalf("Incorrect body: want=%s got=%s", wantBody, gotBody)