Skip to content
This repository was archived by the owner on Dec 16, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion go/mysql/server_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -542,7 +542,13 @@ func TestTLSServer(t *testing.T) {
t.Fatalf("NewListener failed: %v", err)
}
defer l.Close()
host := l.Addr().(*net.TCPAddr).IP.String()

// Make sure hostname is added as an entry to /etc/hosts, otherwise ssl handshake will fail
host, err := os.Hostname()
if err != nil {
t.Fatalf("Failed to get os Hostname: %v", err)
}

port := l.Addr().(*net.TCPAddr).Port

// Create the certs.
Expand Down