Skip to content
This repository has been archived by the owner on Oct 23, 2024. It is now read-only.

Commit

Permalink
Merge pull request #268 from mesosphere/jdef-fix-netinfo-validation
Browse files Browse the repository at this point in the history
add netinfo to validateIPSources config validation
  • Loading branch information
jdef committed Sep 18, 2015
2 parents 92897a1 + 1ba7f14 commit ef2e0d8
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
9 changes: 9 additions & 0 deletions records/config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,3 +14,12 @@ func TestNonLocalAddies(t *testing.T) {
}
}
}

func TestNewConfigValidates(t *testing.T) {
c := NewConfig()
err := validateIPSources(c.IPSources)
if err != nil {
t.Fatal(err)
}
//TODO(jdef) add other validators here..
}
2 changes: 1 addition & 1 deletion records/validation.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ func validateIPSources(srcs []string) error {
}
for _, src := range srcs {
switch src {
case "host", "docker", "mesos":
case "host", "docker", "mesos", "netinfo":
default:
return fmt.Errorf("invalid ip source %q", src)
}
Expand Down

0 comments on commit ef2e0d8

Please sign in to comment.