github.com/anycable/anycable-go@v1.5.1/server/ssl_config_test.go (about)

     1  package server
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/stretchr/testify/assert"
     7  )
     8  
     9  func TestSSLAvailable(t *testing.T) {
    10  	config := NewSSLConfig()
    11  	assert.False(t, config.Available())
    12  
    13  	config.CertPath = "secret.cert"
    14  	assert.False(t, config.Available())
    15  
    16  	config.KeyPath = "secret.key"
    17  	assert.True(t, config.Available())
    18  }