Skip to content

Commit

Permalink
use the right reference when deleting the image (#38)
Browse files Browse the repository at this point in the history
use the right reference when deleting the image (#38)
  • Loading branch information
nimakaviani authored Oct 20, 2023
1 parent eae6d24 commit e34cf08
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion pkg/controllers/gitserver/image_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package gitserver

import (
"context"
"fmt"
"strings"
"testing"

Expand Down Expand Up @@ -52,7 +53,8 @@ func TestReconcileGitServerImage(t *testing.T) {
t.Errorf("Getting docker client: %v", err)
}

_, err = dockerClient.ImageRemove(ctx, resource.Status.ImageID, types.ImageRemoveOptions{})
imageNameID := fmt.Sprintf("%s@%s", GetImageTag(&resource), resource.Status.ImageID)
_, err = dockerClient.ImageRemove(ctx, imageNameID, types.ImageRemoveOptions{})
if err != nil {
t.Errorf("Removing docker image: %v", err)
}
Expand Down

0 comments on commit e34cf08

Please sign in to comment.