Minor formatting tweaks as a follow-up to #2654

This commit is contained in:
Kyle Havlovitz 2017-01-17 19:20:29 -05:00
parent d8dd39ac40
commit f48f105949
No known key found for this signature in database
GPG Key ID: 8A5E6B173056AD6C
3 changed files with 5 additions and 4 deletions

View File

@ -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)
}

View File

@ -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 {

View File

@ -166,7 +166,7 @@ func NewTestServer(t TestingT) *TestServer {
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")
"consul or skip this test")
}
dataDir, err := ioutil.TempDir("", "consul")