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>
This commit is contained in:
Kir Kolyshkin 2018-04-17 10:52:54 -07:00
parent 8bb5a28eed
commit 743f5afcd1

View file

@ -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)
}
}