From 743f5afcd13659e2b6b76791415876797e2ede52 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Tue, 17 Apr 2018 10:52:54 -0700 Subject: [PATCH] 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 --- container/container_unit_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/container/container_unit_test.go b/container/container_unit_test.go index bf45df942e..fbee6e5eb0 100644 --- a/container/container_unit_test.go +++ b/container/container_unit_test.go @@ -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) } }