TestContainerStopTimeout: fix
The unit test is checking that setting of non-default StopTimeout
works, but it checked the value of StopSignal instead.
Amazingly, the test was working since the default StopSignal is SIGTERM,
which has the numeric value of 15.
Fixes: commit e66d21089 ("Add config parameter to change ...")
Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
Upstream-commit: 743f5afcd13659e2b6b76791415876797e2ede52
Component: engine
This commit is contained in:
@@ -52,9 +52,9 @@ func TestContainerStopTimeout(t *testing.T) {
|
||||
c = &Container{
|
||||
Config: &container.Config{StopTimeout: &stopTimeout},
|
||||
}
|
||||
s = c.StopSignal()
|
||||
if s != 15 {
|
||||
t.Fatalf("Expected 15, got %v", s)
|
||||
s = c.StopTimeout()
|
||||
if s != stopTimeout {
|
||||
t.Fatalf("Expected %v, got %v", stopTimeout, s)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user