mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-17 07:03:31 +00:00
rename probe.Healthy to probe.Success and renam probe.Unhealthy to probe.Failure.
This commit is contained in:
@@ -40,7 +40,7 @@ func (pr ExecProber) Probe(e uexec.Cmd) (probe.Status, error) {
|
||||
return probe.Unknown, err
|
||||
}
|
||||
if strings.ToLower(string(data)) != defaultHealthyOutput {
|
||||
return probe.Unhealthy, nil
|
||||
return probe.Failure, nil
|
||||
}
|
||||
return probe.Healthy, nil
|
||||
return probe.Success, nil
|
||||
}
|
||||
|
@@ -46,11 +46,11 @@ func TestExec(t *testing.T) {
|
||||
fake := FakeCmd{}
|
||||
tests := []healthCheckTest{
|
||||
// Ok
|
||||
{probe.Healthy, false, []byte("OK"), nil},
|
||||
{probe.Success, false, []byte("OK"), nil},
|
||||
// Run returns error
|
||||
{probe.Unknown, true, []byte("OK, NOT"), fmt.Errorf("test error")},
|
||||
// Unhealthy
|
||||
{probe.Unhealthy, false, []byte("Fail"), nil},
|
||||
{probe.Failure, false, []byte("Fail"), nil},
|
||||
}
|
||||
for _, test := range tests {
|
||||
fake.out = test.output
|
||||
|
Reference in New Issue
Block a user