Browse code

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>

Kir Kolyshkin authored on 2018/04/18 02:52:54
Showing 1 changed files
... ...
@@ -52,9 +52,9 @@ func TestContainerStopTimeout(t *testing.T) {
52 52
 	c = &Container{
53 53
 		Config: &container.Config{StopTimeout: &stopTimeout},
54 54
 	}
55
-	s = c.StopSignal()
56
-	if s != 15 {
57
-		t.Fatalf("Expected 15, got %v", s)
55
+	s = c.StopTimeout()
56
+	if s != stopTimeout {
57
+		t.Fatalf("Expected %v, got %v", stopTimeout, s)
58 58
 	}
59 59
 }
60 60