Skip to content

Commit 3104849

Browse files
committed
fixup! ASOAPI: add resource mutator framework
1 parent d50ea06 commit 3104849

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

exp/mutators/mutator_test.go

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import (
2424
. "github.com/onsi/gomega"
2525
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
2626
"k8s.io/apimachinery/pkg/runtime"
27+
"sigs.k8s.io/controller-runtime/pkg/reconcile"
2728
)
2829

2930
func TestApplyMutators(t *testing.T) {
@@ -89,6 +90,16 @@ func TestApplyMutators(t *testing.T) {
8990
},
9091
expectedErr: errors.New("mutator err"),
9192
},
93+
{
94+
name: "incompatible is terminal",
95+
resources: []runtime.RawExtension{},
96+
mutators: []ResourcesMutator{
97+
func(_ context.Context, us []*unstructured.Unstructured) error {
98+
return Incompatible{}
99+
},
100+
},
101+
expectedErr: reconcile.TerminalError(Incompatible{}),
102+
},
92103
}
93104

94105
for _, test := range tests {

0 commit comments

Comments
 (0)