CSPL-4621: add newcomer-friendly integration test writing guide#1835
CSPL-4621: add newcomer-friendly integration test writing guide#1835kubabuczak wants to merge 7 commits intodevelopfrom
Conversation
Add docs/IntegrationTesting.md covering what tests exist, how to write new tests, how to execute them locally and in CI, and how to debug failures. Replace test/README.md with a pointer to the canonical doc. Add doc-update reminders in the PR template and AGENTS.md so the guide stays accurate when the test framework changes. Made-with: Cursor
…ures) Clarifies what should and shouldn't be tested in integration tests, with a practical checklist for new test authors. Made-with: Cursor
- Remove --cluster-wide flag references (feature to be removed from code) - Use docker-buildx with PLATFORMS variable for single-platform builds - Add SPLUNK_GENERAL_TERMS placeholder with link to README for legal info - Use generic It label placeholders (<mysuite>, <mytag>, <topology>) - Add critical block around test logic in sequence diagram
… namespace prefix Restructure the "How to Execute Tests" section into a sequential setup guide, fix broken ginkgo flag syntax (custom flags must come after --), add $REGISTRY/$OPERATOR_IMG/$SPLUNK_IMG variables for copy-pasteable commands, document cloud storage limitations (CSPL-4694), add debugging and cleanup guidance (stuck finalizers, leftover namespaces), and prefix all test namespaces with sok-test- for easy discovery.
Remove the broken `- docker buildx rm` line that was inside a shell continuation (causing `bash: -: command not found`) and was also destroying the buildx builder cache after every build. The builder now persists across runs so subsequent builds use cached layers. Also fix ENVIRONMENT default assignment and make `rm` in manifests target non-fatal with `-f`.
|
Thanks for putting this guide together. The documentation direction looks useful. I did notice one blocking issue in the code change mixed into this PR: Changing
Before this PR, |
|
One small docs follow-up as well: in |
Oh, I did it to make kubectl commands easier - let's revert it. I'll address this issue (using GetName() instead of GetNamespace()) in separate PR |
Revert the sok-test- namespace prefix that broke GetName()-based callers. Update debugging docs to point at the cluster-wide operator namespace. Add tools/cleanup.sh and make undeploy references. Made-with: Cursor
Reframe the "gray zone" section: lightweight Splunk-side status checks are explicitly acceptable as secondary checks, but must always be paired with a primary operator-level assertion.
Description
Adds a comprehensive integration test writing guide for newcomers, improves test execution UX, and fixes a Makefile bug.
Key Changes
--)docker-buildxMakefile target (broken builder teardown, cache preservation)tools/cleanup.shandmake undeployreferences to cleanup docsRelated Issues
PR Checklist
test/testenv/,test/run-tests.sh,test/env.sh),docs/IntegrationTesting.mdhas been updated