Before adding to this file, carefully consider that poorly written AGENTS.md files can hurt task success rates, while also increasing token usage.
When creating or modifying Ginkgo E2E test files:
- Avoid
k8sClient.Update(...): This call will occasionally fail due to Kubernetes resources being modified between the Get and Update calls.- Instead, use fixture-specific
Updatefunctions. Most fixture packages include anUpdatefunction, for example forArgoCDCR: useargocdFixture.Update(...). For generic resource update, seek8sFixture.Update(...).
- Instead, use fixture-specific
- Tests that run within this folder run in parallel against a single K8s cluster. Thus, these tests cannot step on each others toes by, for example, modifying cluster resources that are shared by other parallel tests. (It is fine to READ from shared resources, but NOT to write to them).
- A non-exhaustive list of examples:
- Tests that rely on managed-by label should remain in sequential.
- Tests that log in to an Argo CD instance via argocd cli should remain in sequential.
- Tests that use ArgoCD CR
.spec.sourceNamespacesshould remain in sequential.
- A non-exhaustive list of examples:
- Use
Describe("GitOps Operator Parallel E2E Tests", func() { ... })as the top-level describe block - Call
fixture.EnsureParallelCleanSlate()in theBeforeEachfunction. (notEnsureSequentialCleanSlate)
- Use
Describe("GitOps Operator Sequential E2E Tests", func() { ... })as the top-level describe block - Call
fixture.EnsureSequentialCleanSlate()in theBeforeEachfunction. (notEnsureParallelCleanSlate)