github.com/blixtra/nomad@v0.7.2-0.20171221000451-da9a1d7bb050/nomad/structs/config/tls_test.go (about)

     1  package config
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestTLSConfig_Merge(t *testing.T) {
    10  	assert := assert.New(t)
    11  	a := &TLSConfig{
    12  		CAFile:   "test-ca-file",
    13  		CertFile: "test-cert-file",
    14  	}
    15  
    16  	b := &TLSConfig{
    17  		EnableHTTP:           true,
    18  		EnableRPC:            true,
    19  		VerifyServerHostname: true,
    20  		CAFile:               "test-ca-file-2",
    21  		CertFile:             "test-cert-file-2",
    22  		RPCUpgradeMode:       true,
    23  	}
    24  
    25  	new := a.Merge(b)
    26  	assert.Equal(b, new)
    27  }