diff --git a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go index edb60cb7d8d..2114dab924d 100644 --- a/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go +++ b/docs/book/src/cronjob-tutorial/testdata/project/internal/controller/suite_test.go @@ -75,7 +75,8 @@ var _ = BeforeSuite(func() { ctx, cancel = context.WithCancel(context.TODO()) /* - First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you. + The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory. + This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs. */ By("bootstrapping test environment") testEnv = &envtest.Environment{ @@ -98,8 +99,8 @@ var _ = BeforeSuite(func() { Expect(cfg).NotTo(BeNil()) /* - The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme. - This ensures that the CronJob API/Kind will be used in our test controller. + The CronJob Kind is added to the runtime scheme used by the test environment. + This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources. */ err = batchv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) diff --git a/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go b/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go index edb60cb7d8d..2114dab924d 100644 --- a/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go +++ b/docs/book/src/multiversion-tutorial/testdata/project/internal/controller/suite_test.go @@ -75,7 +75,8 @@ var _ = BeforeSuite(func() { ctx, cancel = context.WithCancel(context.TODO()) /* - First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you. + The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory. + This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs. */ By("bootstrapping test environment") testEnv = &envtest.Environment{ @@ -98,8 +99,8 @@ var _ = BeforeSuite(func() { Expect(cfg).NotTo(BeNil()) /* - The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme. - This ensures that the CronJob API/Kind will be used in our test controller. + The CronJob Kind is added to the runtime scheme used by the test environment. + This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources. */ err = batchv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred()) diff --git a/hack/docs/internal/cronjob-tutorial/writing_tests_env.go b/hack/docs/internal/cronjob-tutorial/writing_tests_env.go index dae5490fb6b..cbeff61460f 100644 --- a/hack/docs/internal/cronjob-tutorial/writing_tests_env.go +++ b/hack/docs/internal/cronjob-tutorial/writing_tests_env.go @@ -43,13 +43,14 @@ var ( const SuiteTestReadCRD = ` /* - First, the envtest cluster is configured to read CRDs from the CRD directory Kubebuilder scaffolds for you. + The envtest environment is configured to load Custom Resource Definitions (CRDs) from the specified directory. + This setup enables the test environment to recognize and interact with the custom resources defined by these CRDs. */` const SuiteTestAddSchema = ` /* - The autogenerated test code will add the CronJob Kind schema to the default client-go k8s scheme. - This ensures that the CronJob API/Kind will be used in our test controller. + The CronJob Kind is added to the runtime scheme used by the test environment. + This ensures that the CronJob API is registered with the scheme, allowing the test controller to recognize and interact with CronJob resources. */ err = batchv1.AddToScheme(scheme.Scheme) Expect(err).NotTo(HaveOccurred())