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 | // This test requires network access, which does not |
| 12 | // work in package build environments |
| 13 | t.Skip() |
| 14 | tpl := `{{"www.google.com" | getHostByName}}` |
| 15 | |
| 16 | resolvedIP, _ := runRaw(tpl, nil) |
| 17 | |
| 18 | ip := net.ParseIP(resolvedIP) |
| 19 | assert.NotNil(t, ip) |
| 20 | assert.NotEmpty(t, ip) |
| 21 | } |