Skip to content

Commit

Permalink
fix: removes duplicate root manifest loading when loading collections
Browse files Browse the repository at this point in the history
Signed-off-by: Jennifer Power <[email protected]>
  • Loading branch information
jpower432 committed Oct 19, 2022
1 parent a9f24cc commit baef487
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion registryclient/orasclient/oras.go
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ func getDefaultMediaType(file string) (string, error) {

// loadCollection is a helper function that allows a collection to be loaded with a given repository.
func loadCollection(ctx context.Context, repo registry.Repository, reference string) (collection.Collection, error) {
desc, _, err := repo.FetchReference(ctx, reference)
desc, err := repo.Resolve(ctx, reference)
if err != nil {
return collection.Collection{}, err
}
Expand Down
2 changes: 1 addition & 1 deletion registryclient/orasclient/oras_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ func TestPushPull(t *testing.T) {
c, err := NewClient(WithPlainHTTP(true))
require.NoError(t, err)
_, _, err = c.Pull(context.TODO(), notExistRef, memory.New())
require.EqualError(t, err, fmt.Sprintf("%s: not found", notExistTag))
require.EqualError(t, err, fmt.Sprintf("%s: not found", notExistRef))
require.NoError(t, c.Destroy())
})
}

0 comments on commit baef487

Please sign in to comment.