Skip to content

Commit 66876f9

Browse files
committed
Adding another folder with a new CRD avoiding late deleted conflicts
1 parent 158b897 commit 66876f9

File tree

2 files changed

+18
-7
lines changed

2 files changed

+18
-7
lines changed

pkg/envtest/envtest_test.go

Lines changed: 7 additions & 7 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
},
@@ -428,13 +428,13 @@ var _ = Describe("Test", func() {
428428
_, err := env.Start()
429429
Expect(err).To(HaveOccurred())
430430
close(done)
431-
}, 30)
431+
}, 10)
432432

433433
It("should not raise an error on invalid dir when flag is disabled", func(done Done) {
434434
env = &Environment{ErrorIfCRDPathMissing: false, CRDDirectoryPaths: []string{invalidDirectory}}
435435
_, err := env.Start()
436436
Expect(err).NotTo(HaveOccurred())
437437
close(done)
438-
}, 30)
438+
}, 10)
439439
})
440440
})
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)