Skip to content

Commit

Permalink
Update test case
Browse files Browse the repository at this point in the history
Signed-off-by: Ilya Dmitrichenko <errordeveloper@gmail.com>
  • Loading branch information
errordeveloper committed Sep 28, 2023
1 parent c621d7f commit 410396c
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions internal/controller/ocirepository_controller_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1860,6 +1860,7 @@ func TestOCIRepository_getArtifactRef(t *testing.T) {

tmpDir := t.TempDir()
server, err := setupRegistryServer(ctx, tmpDir, registryOptions{})
g.Expect(err).ToNot(HaveOccurred())
t.Cleanup(func() {
server.Close()
})
Expand All @@ -1877,7 +1878,7 @@ func TestOCIRepository_getArtifactRef(t *testing.T) {
{
name: "valid url with no reference",
url: "oci://ghcr.io/stefanprodan/charts",
want: "ghcr.io/stefanprodan/charts",
want: "ghcr.io/stefanprodan/charts:latest",
},
{
name: "valid url with tag reference",
Expand Down Expand Up @@ -1946,7 +1947,7 @@ func TestOCIRepository_getArtifactRef(t *testing.T) {
return
}
g.Expect(err).ToNot(HaveOccurred())
g.Expect(got).To(Equal(tt.want))
g.Expect(got.String()).To(Equal(tt.want))
})
}
}
Expand Down

0 comments on commit 410396c

Please sign in to comment.