addressing comments.

This commit is contained in:
Anirudh
2016-10-27 13:30:04 -07:00
parent c0d116c419
commit 1ae1a19e7b
2 changed files with 7 additions and 8 deletions

View File

@@ -226,10 +226,12 @@ func TestGCUnscheduledTerminating(t *testing.T) {
}
testCases := []struct {
name string
pods []nameToPhase
deletedPodNames sets.String
}{
{
name: "Unscheduled pod in any phase must be deleted",
pods: []nameToPhase{
{name: "a", phase: api.PodFailed, deletionTimeStamp: &unversioned.Time{}, nodeName: ""},
{name: "b", phase: api.PodSucceeded, deletionTimeStamp: &unversioned.Time{}, nodeName: ""},
@@ -238,6 +240,7 @@ func TestGCUnscheduledTerminating(t *testing.T) {
deletedPodNames: sets.NewString("a", "b", "c"),
},
{
name: "Scheduled pod in any phase must not be deleted",
pods: []nameToPhase{
{name: "a", phase: api.PodFailed, deletionTimeStamp: nil, nodeName: ""},
{name: "b", phase: api.PodSucceeded, deletionTimeStamp: nil, nodeName: "node"},
@@ -292,7 +295,7 @@ func TestGCUnscheduledTerminating(t *testing.T) {
pass = false
}
if !pass {
t.Errorf("[%v]pod's deleted expected and actual did not match.\n\texpected: %v\n\tactual: %v", i, test.deletedPodNames, deletedPodNames)
t.Errorf("[%v]pod's deleted expected and actual did not match.\n\texpected: %v\n\tactual: %v, test: %v", i, test.deletedPodNames, deletedPodNames, test.name)
}
}
}