Fix a unit test failure that only happens on golang 1.15

- Use the SAN field when creating a test cert or else the corresponding
  unit tests will fail when run with golang 1.15
This commit is contained in:
Ryan Richard 2020-09-10 18:50:34 -07:00
parent 6deaa0fb1a
commit 22bf24b775

View File

@ -395,7 +395,7 @@ func newCertProvider(t *testing.T) (provider.DynamicTLSServingCertProvider, []by
serverName := "local-user-authenticator" serverName := "local-user-authenticator"
cert, err := ca.Issue( cert, err := ca.Issue(
pkix.Name{CommonName: serverName}, pkix.Name{CommonName: serverName},
[]string{}, []string{serverName},
time.Hour*24, time.Hour*24,
) )
require.NoError(t, err) require.NoError(t, err)