Debian Codegraph @

network_test.go

raw ◀ ▶
Source reconstructed at patch state 0 of 1 — not the installed (fully patched) source.
1 Debian patch touch this file
1 package sprig
2
3 import (
4 "net"
5 "testing"
6
7 "github.com/stretchr/testify/assert"
8 )
9
10 func TestGetHostByName(t *testing.T) {
11 tpl := `{{"www.google.com" | getHostByName}}`
12
13 resolvedIP, _ := runRaw(tpl, nil)
14
15 ip := net.ParseIP(resolvedIP)
16 assert.NotNil(t, ip)
17 assert.NotEmpty(t, ip)
18 }