Skip to content

Commit

Permalink
fix unit test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
senthilrch committed Sep 1, 2021
1 parent 3b5895b commit 304712a
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions pkg/images/image_manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ func TestUpdateImageCacheStatus(t *testing.T) {
expectError: false,
},
{
name: "#6: Purge - Unsuccessful",
name: "#6: Purge - Successful",
imageworkstatus: map[string]ImageWorkResult{
"fakejob": {
ImageWorkRequest: ImageWorkRequest{
Expand All @@ -523,8 +523,7 @@ func TestUpdateImageCacheStatus(t *testing.T) {
},
},
},
expectError: true,
expectedErrorString: "no pods matched job",
expectError: false,
},
{
name: "#7: Purge - Unsuccessful",
Expand Down Expand Up @@ -562,7 +561,7 @@ func TestUpdateImageCacheStatus(t *testing.T) {
expectedErrorString: "more than one pod matched job",
},
{
name: "#8: Create - Unsuccessful",
name: "#8: Create - Successful",
imageworkstatus: map[string]ImageWorkResult{
"fakejob": {
ImageWorkRequest: ImageWorkRequest{
Expand Down Expand Up @@ -597,9 +596,7 @@ func TestUpdateImageCacheStatus(t *testing.T) {
},
},
},
jobDeleteErr: true,
expectError: true,
expectedErrorString: "Internal error occurred: fake error",
expectError: false,
},
}

Expand Down

0 comments on commit 304712a

Please sign in to comment.