Skip to content

Commit

Permalink
fix: azure hasLocation incorporates endpoint. Fixes #11512 (#11513)
Browse files Browse the repository at this point in the history
Signed-off-by: Roel Arents <roel.arents@kadaster.nl>
  • Loading branch information
roelarents authored and terrytangyuan committed Aug 11, 2023
1 parent 5797668 commit aff72d0
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/workflow_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -2525,7 +2525,7 @@ func (a *AzureArtifact) SetKey(key string) error {
}

func (a *AzureArtifact) HasLocation() bool {
return a != nil && a.Container != "" && a.Blob != ""
return a != nil && a.Endpoint != "" && a.Container != "" && a.Blob != ""
}

// HDFSArtifact is the location of an HDFS artifact
Expand Down
2 changes: 1 addition & 1 deletion pkg/apis/workflow/v1alpha1/workflow_types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ func TestArtifactoryArtifact(t *testing.T) {
}

func TestAzureArtifact(t *testing.T) {
a := &AzureArtifact{Blob: "my-blob", AzureBlobContainer: AzureBlobContainer{Container: "my-container"}}
a := &AzureArtifact{Blob: "my-blob", AzureBlobContainer: AzureBlobContainer{Endpoint: "my-endpoint", Container: "my-container"}}
assert.True(t, a.HasLocation())
assert.NoError(t, a.SetKey("my-blob"))
key, err := a.GetKey()
Expand Down

0 comments on commit aff72d0

Please sign in to comment.