Skip to content

Commit

Permalink
update unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
elenz97 committed Feb 9, 2024
1 parent 7322e82 commit 2c2d827
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apiv2/pkg/clients/artifact/artifact_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package artifact

import (
"context"
"github.com/mittwald/goharbor-client/v5/apiv2/pkg/util"
"testing"

"github.com/mittwald/goharbor-client/v5/apiv2/internal/api/client/artifact"
Expand Down Expand Up @@ -223,6 +224,7 @@ func TestRESTClient_GetArtifact(t *testing.T) {
getParams.WithRepositoryName(repositoryName)
getParams.WithReference(reference)
getParams.WithContext(ctx)
getParams.WithWithLabel(util.BoolPtr(true))

getParams.WithTimeout(apiClient.Options.Timeout)

Expand All @@ -248,6 +250,7 @@ func TestRESTClient_ListArtifacts(t *testing.T) {
listParams.WithSort(&apiClient.Options.Sort)
listParams.WithQ(&apiClient.Options.Query)
listParams.WithTimeout(apiClient.Options.Timeout)
listParams.WithWithLabel(util.BoolPtr(true))

mockClient.Artifact.On("ListArtifacts", listParams, mock.AnythingOfType("runtime.ClientAuthInfoWriterFunc")).
Return(&artifact.ListArtifactsOK{Payload: []*model.Artifact{}}, nil)
Expand Down

0 comments on commit 2c2d827

Please sign in to comment.