Fix use of %s instead of %+v, from go 1.8 vet

atomic-update
Chris Bednarski 8 years ago
parent 8c778ab2a7
commit df6e535d57

@ -2,6 +2,6 @@ language: go
go:
- 1.6.3
- 1.7.3
- 1.7.4
- 1.8beta1
- master

@ -141,7 +141,7 @@ func TestParseLineMultiHostnameComment(t *testing.T) {
!hosts.Contains(hostess.MustHostname("domain.com", "66.33.99.11", false)) ||
len(hosts) != 2 {
t.Error("Expected to find domain.com and test.domain.com (disabled)")
t.Errorf("Found %s", hosts)
t.Errorf("Found %+v", hosts)
}
}

@ -82,12 +82,12 @@ func TestContainsDomainIp(t *testing.T) {
expectedHostname := hostess.MustHostname(domain, ip, true)
if !hosts.Contains(expectedHostname) {
t.Errorf("Expected to find %s", expectedHostname)
t.Errorf("Expected to find %+v", expectedHostname)
}
extraneousHostname := hostess.MustHostname("yahoo.com", "4.3.2.1", false)
if hosts.Contains(extraneousHostname) {
t.Errorf("Did not expect to find %s", extraneousHostname)
t.Errorf("Did not expect to find %+v", extraneousHostname)
}
}

@ -27,10 +27,10 @@ func TestEqual(t *testing.T) {
c := hostess.MustHostname("localhost", "127.0.1.1", false)
if !a.Equal(b) {
t.Errorf("%s and %s should be equal", a, b)
t.Errorf("%+v and %+v should be equal", a, b)
}
if a.Equal(c) {
t.Errorf("%s and %s should not be equal", a, c)
t.Errorf("%+v and %+v should not be equal", a, c)
}
}
@ -55,7 +55,7 @@ func TestIsValid(t *testing.T) {
IPv6: true,
}
if !hostname.IsValid() {
t.Fatalf("%s should be a valid hostname", hostname)
t.Fatalf("%+v should be a valid hostname", hostname)
}
}
@ -67,7 +67,7 @@ func TestIsValidBlank(t *testing.T) {
IPv6: true,
}
if hostname.IsValid() {
t.Errorf("%s should be invalid because the name is blank", hostname)
t.Errorf("%+v should be invalid because the name is blank", hostname)
}
}
func TestIsValidBadIP(t *testing.T) {
@ -78,7 +78,7 @@ func TestIsValidBadIP(t *testing.T) {
IPv6: true,
}
if hostname.IsValid() {
t.Errorf("%s should be invalid because the ip is malformed", hostname)
t.Errorf("%+v should be invalid because the ip is malformed", hostname)
}
}

Loading…
Cancel
Save