Skip to content

Commit

Permalink
Update tls_ca_create_test.go
Browse files Browse the repository at this point in the history
Update Tests
  • Loading branch information
lhaig committed Jun 6, 2023
1 parent e7c6bf6 commit 47b7fa2
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions command/tls_ca_create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@ func TestCACreateCommand(t *testing.T) {
"-name-constraint=true",
"-domain=foo",
"-additional-domain=bar",
"-common-name=CustomCA",
"-country=ZZ",
"-organization=CustOrg",
"-organizational-unit=CustOrgUnit",
},
"foo-agent-ca.pem",
"foo-agent-ca-key.pem",
Expand All @@ -54,6 +58,10 @@ func TestCACreateCommand(t *testing.T) {
require.True(t, cert.PermittedDNSDomainsCritical)
require.Len(t, cert.PermittedDNSDomains, 4)
require.ElementsMatch(t, cert.PermittedDNSDomains, []string{"nomad", "foo", "localhost", "bar"})
require.Equal(t, cert.Issuer.Organization, []string{"CustOrg"})
require.Equal(t, cert.Issuer.OrganizationalUnit, []string{"CustOrgUnit"})
require.Equal(t, cert.Issuer.Country, []string{"ZZ"})
require.Contains(t, cert.Issuer.CommonName, "CustomCA")
},
},
}
Expand Down

0 comments on commit 47b7fa2

Please sign in to comment.