Skip to content

Commit

Permalink
update test file to include example with host ports
Browse files Browse the repository at this point in the history
  • Loading branch information
sgsullivan committed Aug 4, 2022
1 parent 3c07bfc commit a97edaf
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions hosts_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
)

func TestBuildHostList(t *testing.T) {
res, err := getNonZeroValOpts().buildHostList("unit_test_resources/legacy_hosts")
res, err := getNonZeroValOpts().buildHostList("unit_test_resources/hosts_with_ports")
if err != nil {
t.Fatalf("error building hostList: %s", err)
}
Expand All @@ -17,13 +17,13 @@ func TestBuildHostList(t *testing.T) {
expected := []string{
"192.168.2.2",
"192.168.2.3",
"192.168.2.4",
"192.168.2.4:32",
"192.168.2.5",
"192.168.2.6",
"192.168.2.7",
"192.168.2.8",
"192.168.2.8:1000",
"192.168.2.9",
"192.168.2.10",
"192.168.2.10:4141",
}

if !reflect.DeepEqual(res, expected) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
192.168.2.2
192.168.2.3
192.168.2.4
192.168.2.4:32
192.168.2.5
192.168.2.6
192.168.2.7
192.168.2.8
192.168.2.8:1000
192.168.2.9
192.168.2.10
192.168.2.10:4141

0 comments on commit a97edaf

Please sign in to comment.