Skip to content

Commit

Permalink
Minor formatting tweaks as a follow-up to #2654
Browse files Browse the repository at this point in the history
  • Loading branch information
kyhavlov committed Jan 18, 2017
1 parent d8dd39a commit f48f105
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions consul/health_endpoint_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -399,12 +399,12 @@ func TestHealth_ServiceChecks_NodeMetaFilter(t *testing.T) {

for _, tc := range cases {
var out structs.IndexedHealthChecks
inState := structs.ServiceSpecificRequest{
args := structs.ServiceSpecificRequest{
Datacenter: "dc1",
NodeMetaFilters: tc.filters,
ServiceName: "db",
}
if err := msgpackrpc.CallWithCodec(codec, "Health.ServiceChecks", &inState, &out); err != nil {
if err := msgpackrpc.CallWithCodec(codec, "Health.ServiceChecks", &args, &out); err != nil {
t.Fatalf("err: %v", err)
}

Expand Down
1 change: 1 addition & 0 deletions consul/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -289,6 +289,7 @@ type Node struct {
}
type Nodes []*Node

// SatisfiesMetaFilters returns true if the metadata map contains the given filters
func SatisfiesMetaFilters(meta map[string]string, filters map[string]string) bool {
for key, value := range filters {
if v, ok := meta[key]; !ok || v != value {
Expand Down
4 changes: 2 additions & 2 deletions testutil/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,8 @@ func NewTestServer(t TestingT) *TestServer {
// an optional callback function to modify the configuration.
func NewTestServerConfig(t TestingT, cb ServerConfigCallback) *TestServer {
if path, err := exec.LookPath("consul"); err != nil || path == "" {
t.Fatal("consul not found on $PATH - download and install " +
"consul or skip this test")
t.Fatal("consul not found on $PATH - download and install " +
"consul or skip this test")
}

dataDir, err := ioutil.TempDir("", "consul")
Expand Down

0 comments on commit f48f105

Please sign in to comment.