Merge pull request #106 from mattmoyer/fix-webhook-base64-encoding

Fix base64 encoding style in webhookcachefiller.
This commit is contained in:
Matt Moyer 2020-09-15 14:12:02 -05:00 committed by GitHub
commit e428877473
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -123,5 +123,5 @@ func getCABundle(spec *idpv1alpha1.TLSSpec) ([]byte, error) {
if spec == nil { if spec == nil {
return nil, nil return nil, nil
} }
return base64.RawStdEncoding.DecodeString(spec.CertificateAuthorityData) return base64.StdEncoding.DecodeString(spec.CertificateAuthorityData)
} }

View File

@ -159,7 +159,7 @@ func TestNewWebhookAuthenticator(t *testing.T) {
spec := &idpv1alpha1.WebhookIdentityProviderSpec{ spec := &idpv1alpha1.WebhookIdentityProviderSpec{
Endpoint: url, Endpoint: url,
TLS: &idpv1alpha1.TLSSpec{ TLS: &idpv1alpha1.TLSSpec{
CertificateAuthorityData: base64.RawStdEncoding.EncodeToString([]byte(caBundle)), CertificateAuthorityData: base64.StdEncoding.EncodeToString([]byte(caBundle)),
}, },
} }
res, err := newWebhookAuthenticator(spec, ioutil.TempFile, clientcmd.WriteToFile) res, err := newWebhookAuthenticator(spec, ioutil.TempFile, clientcmd.WriteToFile)