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 ("Add config parameter to change ...")
@@ -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)
}
}
