File tree Expand file tree Collapse file tree 3 files changed +12
-9
lines changed
cronjob-tutorial/testdata/project/internal/controller
multiversion-tutorial/testdata/project/internal/controller
hack/docs/internal/cronjob-tutorial Expand file tree Collapse file tree 3 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ var _ = BeforeSuite(func() {
75
75
ctx , cancel = context .WithCancel (context .TODO ())
76
76
77
77
/*
78
- First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you.
78
+ The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory.
79
+ This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs.
79
80
*/
80
81
By ("bootstrapping test environment" )
81
82
testEnv = & envtest.Environment {
@@ -98,8 +99,8 @@ var _ = BeforeSuite(func() {
98
99
Expect (cfg ).NotTo (BeNil ())
99
100
100
101
/*
101
- The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme .
102
- This ensures that the CronJob API/Kind will be used in our test controller.
102
+ The CronJob Kind is added to the runtime scheme used by the test environment .
103
+ This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources .
103
104
*/
104
105
err = batchv1 .AddToScheme (scheme .Scheme )
105
106
Expect (err ).NotTo (HaveOccurred ())
Original file line number Diff line number Diff line change @@ -75,7 +75,8 @@ var _ = BeforeSuite(func() {
75
75
ctx , cancel = context .WithCancel (context .TODO ())
76
76
77
77
/*
78
- First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you.
78
+ The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory.
79
+ This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs.
79
80
*/
80
81
By ("bootstrapping test environment" )
81
82
testEnv = & envtest.Environment {
@@ -98,8 +99,8 @@ var _ = BeforeSuite(func() {
98
99
Expect (cfg ).NotTo (BeNil ())
99
100
100
101
/*
101
- The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme .
102
- This ensures that the CronJob API/Kind will be used in our test controller.
102
+ The CronJob Kind is added to the runtime scheme used by the test environment .
103
+ This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources .
103
104
*/
104
105
err = batchv1 .AddToScheme (scheme .Scheme )
105
106
Expect (err ).NotTo (HaveOccurred ())
Original file line number Diff line number Diff line change @@ -43,13 +43,14 @@ var (
43
43
44
44
const SuiteTestReadCRD = `
45
45
/*
46
- First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you.
46
+ The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory.
47
+ This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs.
47
48
*/`
48
49
49
50
const SuiteTestAddSchema = `
50
51
/*
51
- The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme .
52
- This ensures that the CronJob API/Kind will be used in our test controller.
52
+ The CronJob Kind is added to the runtime scheme used by the test environment .
53
+ This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources .
53
54
*/
54
55
err = batchv1.AddToScheme(scheme.Scheme)
55
56
Expect(err).NotTo(HaveOccurred())
You can’t perform that action at this time.
0 commit comments