mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-22 19:31:44 +00:00
Fix test
Signed-off-by: Shiming Zhang <wzshiming@foxmail.com>
This commit is contained in:
parent
25ee51c791
commit
44e9f6175d
@ -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)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user