Atlas › Test

TestLookupLocalhostIPMissingHostname

Exact test identity: go.temporal.io/server/temporal/environment/TestLookupLocalhostIPMissingHostname

Package
go.temporal.io/server/temporal/environment
Suite / test hierarchy
TestLookupLocalhostIPMissingHostname
Test
TestLookupLocalhostIPMissingHostname
Introduced at
env.go ×1 Frontier kind: Joint frontier
Covered ranges
2
Covered lines
8
Covered files
1

Covered source

Expand a file to inspect source; the > gutter marks covered lines.

go.temporal.io/server/temporal/environment/env.go 8 covered LOC · 2 ranges

Open complete file

39 )
40
41 > func lookupLocalhostIP(domain string) string { env.go
42 > // lookup localhost and favor the first ipv4 address
43 > // unless there are only ipv6 addresses available
44 > ips, err := net.LookupIP(domain)
45 > if err != nil || len(ips) == 0 {
46 > // fallback to default instead of error env.go
47 > return localhostIPDefault
48 > }
49 for _, ip := range ips {
50 if ip4 := ip.To4(); ip4 != nil {