Skip to content

Commit c554e05

Browse files
authored
Merge pull request #4624 from fiunchinho/remove-outdated-examples
📖 Remove outdated test examples
2 parents a3f3f87 + 55f7fe2 commit c554e05

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

Diff for: docs/book/src/cronjob-tutorial/writing-tests.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -23,11 +23,11 @@ This Status update example above demonstrates a general testing strategy for a c
2323
* Writing stubs for creating test objects
2424
* Isolating changes to an object to test specific controller behavior
2525

26-
## Advanced Examples
26+
<aside class="note">
27+
<h1>Examples</h1>
2728

28-
There are more involved examples of using envtest to rigorously test controller behavior. Examples include:
29+
You can use the plugin [DeployImage](../plugins/available/deploy-image-plugin-v1-alpha.md) to check examples. This plugin allows users to scaffold API/Controllers to deploy and manage an Operand (image) on the cluster following the guidelines and best practices. It abstracts the complexities of achieving this goal while allowing users to customize the generated code.
2930

30-
* Azure Databricks Operator: see their fully fleshed-out
31-
[`suite_test.go`](https://github.com/microsoft/azure-databricks-operator/blob/0f722a710fea06b86ecdccd9455336ca712bf775/controllers/suite_test.go)
32-
as well as any `*_test.go` file in that directory [like this
33-
one](https://github.com/microsoft/azure-databricks-operator/blob/0f722a710fea06b86ecdccd9455336ca712bf775/controllers/secretscope_controller_test.go).
31+
Therefore, you can check that a test using ENV TEST will be generated for the controller which has the purpose to ensure that the Deployment is created successfully. You can see an example of its code implementation under the `testdata` directory with the [DeployImage](../plugins/available/deploy-image-plugin-v1-alpha.md) samples [here](https://github.com/kubernetes-sigs/kubebuilder/blob/v3.7.0/testdata/project-v4-with-plugins/controllers/busybox_controller_test.go).
32+
33+
</aside>

0 commit comments

Comments
 (0)