Skip to content

Commit 3e13646

Browse files
authored
Merge pull request #725 from knabben/fix-flake-env
🏃 Adding another folder with the CRD avoiding late deleted conflicts
2 parents 56b6a9c + fe71678 commit 3e13646

File tree

2 files changed

+16
-5
lines changed

2 files changed

+16
-5
lines changed

pkg/envtest/envtest_test.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,22 +167,22 @@ var _ = Describe("Test", func() {
167167

168168
It("should install the CRDs into the cluster using file", func(done Done) {
169169
crds, err = InstallCRDs(env.Config, CRDInstallOptions{
170-
Paths: []string{filepath.Join(".", "testdata", "examplecrd2.yaml")},
170+
Paths: []string{filepath.Join(".", "testdata", "crds", "examplecrd3.yaml")},
171171
})
172172
Expect(err).NotTo(HaveOccurred())
173173

174174
crd := &v1beta1.CustomResourceDefinition{}
175-
err = c.Get(context.TODO(), types.NamespacedName{Name: "bazs.qux.example.com"}, crd)
175+
err = c.Get(context.TODO(), types.NamespacedName{Name: "configs.foo.example.com"}, crd)
176176
Expect(err).NotTo(HaveOccurred())
177-
Expect(crd.Spec.Names.Kind).To(Equal("Baz"))
177+
Expect(crd.Spec.Names.Kind).To(Equal("Config"))
178178

179179
err = WaitForCRDs(env.Config, []*v1beta1.CustomResourceDefinition{
180180
{
181181
Spec: v1beta1.CustomResourceDefinitionSpec{
182-
Group: "qux.example.com",
182+
Group: "foo.example.com",
183183
Version: "v1beta1",
184184
Names: v1beta1.CustomResourceDefinitionNames{
185-
Plural: "bazs",
185+
Plural: "configs",
186186
}},
187187
},
188188
},
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
apiVersion: apiextensions.k8s.io/v1beta1
2+
kind: CustomResourceDefinition
3+
metadata:
4+
name: configs.foo.example.com
5+
spec:
6+
group: foo.example.com
7+
names:
8+
kind: Config
9+
plural: configs
10+
scope: Namespaced
11+
version: "v1beta1"

0 commit comments

Comments
 (0)