mirror of
https://github.com/kemko/nomad.git
synced 2026-01-08 03:15:42 +03:00
fix host port handling for ipv6 (#16723)
This commit is contained in:
@@ -15,6 +15,7 @@ import (
|
||||
"net/url"
|
||||
"os"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
@@ -158,7 +159,7 @@ func TestHTTP_AgentJoin(t *testing.T) {
|
||||
httpTest(t, nil, func(s *TestAgent) {
|
||||
// Determine the join address
|
||||
member := s.Agent.Server().LocalMember()
|
||||
addr := fmt.Sprintf("%s:%d", member.Addr, member.Port)
|
||||
addr := net.JoinHostPort(member.Addr.String(), strconv.Itoa(int(member.Port)))
|
||||
|
||||
// Make the HTTP request
|
||||
req, err := http.NewRequest("PUT",
|
||||
|
||||
Reference in New Issue
Block a user