Skip to content
This repository was archived by the owner on Apr 11, 2024. It is now read-only.

Commit 817ad82

Browse files
committed
test: unit test for individual patch generator
1 parent f8c47e2 commit 817ad82

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
package region
2+
3+
import (
4+
"testing"
5+
6+
"github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/api/v1alpha1"
7+
"github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/common/pkg/capi/clustertopology/handlers/mutation"
8+
regiontests "github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/pkg/handlers/aws/mutation/region/tests"
9+
"github.com/d2iq-labs/cluster-api-runtime-extensions-nutanix/pkg/handlers/generic/clusterconfig"
10+
. "github.com/onsi/ginkgo/v2"
11+
. "github.com/onsi/gomega"
12+
)
13+
14+
func TestRegionPatch(t *testing.T) {
15+
RegisterFailHandler(Fail)
16+
RunSpecs(t, "AWS region patch suite")
17+
}
18+
19+
var _ = Describe("AWS region patches", func() {
20+
// only add aws region patch
21+
regionPatchGenerator := func() mutation.GeneratePatches {
22+
return mutation.NewMetaGeneratePatchesHandler("", NewPatch()).(mutation.GeneratePatches)
23+
}
24+
regiontests.TestGeneratePatches(
25+
GinkgoT(),
26+
regionPatchGenerator,
27+
clusterconfig.MetaVariableName,
28+
v1alpha1.AWSVariableName,
29+
VariableName,
30+
)
31+
})

0 commit comments

Comments
 (0)