mirror of
https://github.com/pomerium/pomerium.git
synced 2025-04-29 10:26:29 +02:00
14 lines
335 B
Go
14 lines
335 B
Go
package cryptutil
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGetCertificateServerNames(t *testing.T) {
|
|
cert, err := GenerateCertificate(nil, "www.example.com")
|
|
require.NoError(t, err)
|
|
assert.Equal(t, []string{"www.example.com"}, GetCertificateServerNames(cert))
|
|
}
|