pull/13/head
Chris Bednarski 9 years ago
commit 17b38806dc

3
.gitignore vendored

@ -1,4 +1,5 @@
/hostess
/hostess.exe
/hostess_*
/coverage.out
/coverage.html
/coverage.html

@ -2,6 +2,7 @@ package hostess_test
import (
"fmt"
"runtime"
"strings"
"testing"
@ -140,6 +141,9 @@ func TestParseLine(t *testing.T) {
}
func TestLoadHostfile(t *testing.T) {
if runtime.GOOS == "windows" {
t.Skip("Default host file is empty on Windows")
}
hostfile := hostess.NewHostfile()
hostfile.Read()
if !strings.Contains(string(hostfile.GetData()), domain) {
@ -150,6 +154,6 @@ func TestLoadHostfile(t *testing.T) {
hostname := hostess.NewHostname(domain, ip, enabled)
found := hostfile.Hosts.Contains(hostname)
if !found {
t.Errorf("Expected to find %s", hostname)
t.Errorf("Expected to find %#v", hostname)
}
}

Loading…
Cancel
Save