Added Test case for Engine shutdown
Docker-DCO-1.1-Signed-off-by: Rajdeep Dua <dua_rajdeep@yahoo.com> (github: rajdeepd) Upstream-commit: 0800f8cc19732a41d8f04aaf42427399557afa54 Component: engine
This commit is contained in:
@ -61,6 +61,17 @@ func TestJob(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestEngineShutdown(t *testing.T) {
|
||||
eng := New()
|
||||
if eng.IsShutdown() {
|
||||
t.Fatalf("Engine should not show as shutdown")
|
||||
}
|
||||
eng.Shutdown()
|
||||
if !eng.IsShutdown() {
|
||||
t.Fatalf("Engine should show as shutdown")
|
||||
}
|
||||
}
|
||||
|
||||
func TestEngineCommands(t *testing.T) {
|
||||
eng := New()
|
||||
handler := func(job *Job) Status { return StatusOK }
|
||||
|
||||
Reference in New Issue
Block a user