Skip to content

Commit

Permalink
Merge branch 'master' into git-generator-empty-file
Browse files Browse the repository at this point in the history
  • Loading branch information
agaudreault authored Sep 25, 2023
2 parents 5a3ee26 + cbd8806 commit 320e8fe
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/apis/application/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -555,7 +555,8 @@ func (k *ApplicationSourceKustomize) AllowsConcurrentProcessing() bool {
len(k.CommonAnnotations) == 0 &&
k.NamePrefix == "" &&
k.Namespace == "" &&
k.NameSuffix == ""
k.NameSuffix == "" &&
len(k.Patches) == 0
}

// IsZero returns true when the Kustomize options are considered empty
Expand Down
10 changes: 10 additions & 0 deletions pkg/apis/application/v1alpha1/types_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3002,6 +3002,16 @@ func TestSourceAllowsConcurrentProcessing_KustomizeParams(t *testing.T) {

assert.False(t, src.AllowsConcurrentProcessing())
})

t.Run("Has Patches", func(t *testing.T) {
src := ApplicationSource{Path: ".", Kustomize: &ApplicationSourceKustomize{
Patches: KustomizePatches{{
Path: "test",
}},
}}

assert.False(t, src.AllowsConcurrentProcessing())
})
}

func TestUnSetCascadedDeletion(t *testing.T) {
Expand Down

0 comments on commit 320e8fe

Please sign in to comment.