Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
Shiming Zhang 2021-04-14 15:41:27 +08:00
parent 25ee51c791
commit 44e9f6175d

View File

@ -333,12 +333,6 @@ func expectContinue(t *testing.T, w *worker, c bool, msg string) {
} }
} }
func expectStop(t *testing.T, w *worker, c bool, msg string) {
if c {
t.Errorf("[%s - %s] Expected to stop, but did not", w.probeType, msg)
}
}
func resultsManager(m *manager, probeType probeType) results.Manager { func resultsManager(m *manager, probeType probeType) results.Manager {
switch probeType { switch probeType {
case readiness: case readiness:
@ -508,6 +502,6 @@ func TestStartupProbeDisabledByStarted(t *testing.T) {
// startupProbe fails, but is disabled // startupProbe fails, but is disabled
m.prober.exec = fakeExecProber{probe.Failure, nil} m.prober.exec = fakeExecProber{probe.Failure, nil}
msg = "Started, probe failure, result success" msg = "Started, probe failure, result success"
expectStop(t, w, w.doProbe(), msg) expectContinue(t, w, w.doProbe(), msg)
expectResult(t, w, results.Success, msg) expectResult(t, w, results.Success, msg)
} }