Skip to content

Commit

Permalink
lint test pass
Browse files Browse the repository at this point in the history
  • Loading branch information
Sajiyah-Salat committed Aug 2, 2023
1 parent 6e2a5e2 commit ebe45d1
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/e2e/utils/test_context.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,8 @@ func (t *TestContext) Destroy() {
//nolint:gosec
// if image name is not present or not provided skip execution of docker command
if t.ImageName != "" {
// Remove white space from image name
trimmedImageName := strings.Trim(t.ImageName, "")
// Check trimmedimage name is empty
if len(trimmedImageName) < 0 {
// Check white space from image name
if len(strings.Trim(t.ImageName, "")) == 0 {
fmt.Println("Image not set, skip cleaning up of docker image")
} else {
cmd := exec.Command("docker", "rmi", "-f", t.ImageName)
Expand Down

0 comments on commit ebe45d1

Please sign in to comment.