Skip to content

Commit

Permalink
Merge pull request #2226 from abhinavdahiya/rm-health-unknown
Browse files Browse the repository at this point in the history
Fixes #1775; Removes 'unknown' state
  • Loading branch information
slackpad committed Aug 18, 2016
2 parents 9f2c0da + 7c6c3b3 commit defa2a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 24 deletions.
2 changes: 0 additions & 2 deletions api/health.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ const (
// HealthAny is special, and is used as a wild card,
// not as a specific state.
HealthAny = "any"
HealthUnknown = "unknown"
HealthPassing = "passing"
HealthWarning = "warning"
HealthCritical = "critical"
Expand Down Expand Up @@ -122,7 +121,6 @@ func (h *Health) State(state string, q *QueryOptions) ([]*HealthCheck, *QueryMet
case HealthWarning:
case HealthCritical:
case HealthPassing:
case HealthUnknown:
default:
return nil, nil, fmt.Errorf("Unsupported state: %v", state)
}
Expand Down
21 changes: 0 additions & 21 deletions command/agent/dns_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1745,27 +1745,6 @@ func TestDNS_ServiceLookup_OnlyPassing(t *testing.T) {
if err := srv.agent.RPC("Catalog.Register", args3, &out); err != nil {
t.Fatalf("err: %v", err)
}

args4 := &structs.RegisterRequest{
Datacenter: "dc1",
Node: "quux",
Address: "127.0.0.4",
Service: &structs.NodeService{
Service: "db",
Tags: []string{"master"},
Port: 12345,
},
Check: &structs.HealthCheck{
CheckID: "db",
Name: "db",
ServiceID: "db",
Status: structs.HealthUnknown,
},
}

if err := srv.agent.RPC("Catalog.Register", args4, &out); err != nil {
t.Fatalf("err: %v", err)
}
}

// Register an equivalent prepared query.
Expand Down
1 change: 0 additions & 1 deletion consul/structs/structs.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ const (
// HealthAny is special, and is used as a wild card,
// not as a specific state.
HealthAny = "any"
HealthUnknown = "unknown"
HealthPassing = "passing"
HealthWarning = "warning"
HealthCritical = "critical"
Expand Down

0 comments on commit defa2a6

Please sign in to comment.