Skip to content

Commit

Permalink
use the right reference when deleting the image
Browse files Browse the repository at this point in the history
fixes #36
  • Loading branch information
nimakaviani committed Oct 18, 2023
1 parent fd507f5 commit 9526aba
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 9526aba

Please sign in to comment.