Move some tests to use go sub-test

This commit is contained in:
dhilipkumars
2017-12-02 12:47:31 +05:30
parent 8c1ee761d2
commit 623d7c42ac
3 changed files with 104 additions and 96 deletions

View File

@@ -115,9 +115,11 @@ func TestOldPodsRunning(t *testing.T) {
}
for _, test := range tests {
if expected, got := test.expected, oldPodsRunning(test.newRS, test.oldRSs, test.podMap); expected != got {
t.Errorf("%s: expected %t, got %t", test.name, expected, got)
}
t.Run(test.name, func(t *testing.T) {
if expected, got := test.expected, oldPodsRunning(test.newRS, test.oldRSs, test.podMap); expected != got {
t.Errorf("%s: expected %t, got %t", test.name, expected, got)
}
})
}
}