File tree Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Expand file tree Collapse file tree 1 file changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -801,3 +801,31 @@ metadata:
801
801
namespace: iter8-monitoring
802
802
` )
803
803
}
804
+
805
+ // Demonstrates that metadata.name is only overridden for a kind: Namespace with apiVersion: v1
806
+ // Test for issue #5072
807
+ func TestNameNotOveriddenForNonCoreApiVersionOnANamespaceKind (t * testing.T ) {
808
+ th := kusttest_test .MakeHarness (t )
809
+
810
+ th .WriteF ("azure-servicebus.yaml" , `
811
+ apiVersion: servicebus.azure.com/v1beta20210101preview
812
+ kind: Namespace
813
+ metadata:
814
+ name: core-sb-99
815
+ namespace: without-podinfo
816
+ ` )
817
+ th .WriteK ("." , `
818
+ namespace: podinfo
819
+ resources:
820
+ - azure-servicebus.yaml
821
+ ` )
822
+
823
+ m := th .Run ("." , th .MakeDefaultOptions ())
824
+ th .AssertActualEqualsExpected (m , `
825
+ apiVersion: servicebus.azure.com/v1beta20210101preview
826
+ kind: Namespace
827
+ metadata:
828
+ name: core-sb-99
829
+ namespace: podinfo
830
+ ` )
831
+ }
You can’t perform that action at this time.
0 commit comments