Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
fortuna committed Oct 26, 2023
1 parent 2e49c58 commit 4622a89
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions transport/tls/stream_dialer_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,20 +15,19 @@
package tls

import (
"crypto/tls"
"testing"

"github.com/stretchr/testify/require"
)

func TestWithSNI(t *testing.T) {
var cfg tls.Config
var cfg clientConfig
WithSNI("example.com")("", 0, &cfg)
require.Equal(t, "example.com", cfg.ServerName)
}

func TestWithALPN(t *testing.T) {
var cfg tls.Config
var cfg clientConfig
WithALPN([]string{"h2", "http/1.1"})("", 0, &cfg)
require.Equal(t, []string{"h2", "http/1.1"}, cfg.NextProtos)
}

0 comments on commit 4622a89

Please sign in to comment.