open-nomad/nomad/structs/config/tls_test.go

28 lines
495 B
Go
Raw Normal View History

2017-12-12 00:23:45 +00:00
package config
import (
"testing"
"github.com/stretchr/testify/assert"
)
func TestTLSConfig_Merge(t *testing.T) {
assert := assert.New(t)
a := &TLSConfig{
CAFile: "test-ca-file",
CertFile: "test-cert-file",
}
b := &TLSConfig{
EnableHTTP: true,
EnableRPC: true,
VerifyServerHostname: true,
CAFile: "test-ca-file-2",
CertFile: "test-cert-file-2",
RPCUpgradeMode: true,
}
new := a.Merge(b)
assert.Equal(b, new)
}