You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
framework.Failf("unexpected no error when applying CR without required field: %v", err)
104
104
}
105
105
106
106
ginkgo.By("kubectl explain works to explain CR properties")
107
-
iferr:=verifyKubectlExplain(crd.Crd.Spec.Names.Plural, `(?s)DESCRIPTION:.*Foo CRD for Testing.*FIELDS:.*apiVersion.*<string>.*APIVersion defines.*spec.*<Object>.*Specification of Foo`); err!=nil {
107
+
iferr:=verifyKubectlExplain(f.Namespace.Name, crd.Crd.Spec.Names.Plural, `(?s)DESCRIPTION:.*Foo CRD for Testing.*FIELDS:.*apiVersion.*<string>.*APIVersion defines.*spec.*<Object>.*Specification of Foo`); err!=nil {
108
108
framework.Failf("%v", err)
109
109
}
110
110
111
111
ginkgo.By("kubectl explain works to explain CR properties recursively")
112
-
iferr:=verifyKubectlExplain(crd.Crd.Spec.Names.Plural+".metadata", `(?s)DESCRIPTION:.*Standard object's metadata.*FIELDS:.*creationTimestamp.*<string>.*CreationTimestamp is a timestamp`); err!=nil {
112
+
iferr:=verifyKubectlExplain(f.Namespace.Name, crd.Crd.Spec.Names.Plural+".metadata", `(?s)DESCRIPTION:.*Standard object's metadata.*FIELDS:.*creationTimestamp.*<string>.*CreationTimestamp is a timestamp`); err!=nil {
113
113
framework.Failf("%v", err)
114
114
}
115
-
iferr:=verifyKubectlExplain(crd.Crd.Spec.Names.Plural+".spec", `(?s)DESCRIPTION:.*Specification of Foo.*FIELDS:.*bars.*<\[\]Object>.*List of Bars and their specs`); err!=nil {
115
+
iferr:=verifyKubectlExplain(f.Namespace.Name, crd.Crd.Spec.Names.Plural+".spec", `(?s)DESCRIPTION:.*Specification of Foo.*FIELDS:.*bars.*<\[\]Object>.*List of Bars and their specs`); err!=nil {
116
116
framework.Failf("%v", err)
117
117
}
118
-
iferr:=verifyKubectlExplain(crd.Crd.Spec.Names.Plural+".spec.bars", `(?s)RESOURCE:.*bars.*<\[\]Object>.*DESCRIPTION:.*List of Bars and their specs.*FIELDS:.*bazs.*<\[\]string>.*List of Bazs.*name.*<string>.*Name of Bar`); err!=nil {
118
+
iferr:=verifyKubectlExplain(f.Namespace.Name, crd.Crd.Spec.Names.Plural+".spec.bars", `(?s)RESOURCE:.*bars.*<\[\]Object>.*DESCRIPTION:.*List of Bars and their specs.*FIELDS:.*bazs.*<\[\]string>.*List of Bazs.*name.*<string>.*Name of Bar`); err!=nil {
119
119
framework.Failf("%v", err)
120
120
}
121
121
122
122
ginkgo.By("kubectl explain works to return error when explain is called on property that doesn't exist")
123
-
if_, err:=framework.RunKubectl("explain", crd.Crd.Spec.Names.Plural+".spec.bars2"); err==nil||!strings.Contains(err.Error(), `field "bars2" does not exist`) {
123
+
if_, err:=framework.RunKubectl(f.Namespace.Name, "explain", crd.Crd.Spec.Names.Plural+".spec.bars2"); err==nil||!strings.Contains(err.Error(), `field "bars2" does not exist`) {
124
124
framework.Failf("unexpected no error when explaining property that doesn't exist: %v", err)
125
125
}
126
126
@@ -147,21 +147,21 @@ var _ = SIGDescribe("CustomResourcePublishOpenAPI [Privileged:ClusterAdmin]", fu
147
147
148
148
ginkgo.By("client-side validation (kubectl create and apply) allows request with any unknown properties")
framework.Failf("failed to delete random CR: %v", err)
244
244
}
245
245
246
246
ginkgo.By("kubectl explain works to explain CR")
247
-
iferr:=verifyKubectlExplain(crd.Crd.Spec.Names.Plural, `(?s)DESCRIPTION:.*preserve-unknown-properties in nested field for Testing`); err!=nil {
247
+
iferr:=verifyKubectlExplain(f.Namespace.Name, crd.Crd.Spec.Names.Plural, `(?s)DESCRIPTION:.*preserve-unknown-properties in nested field for Testing`); err!=nil {
0 commit comments