Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .cursorrules
22 changes: 22 additions & 0 deletions AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Repository AI Guidelines

Before adding to this file, carefully consider that poorly written AGENTS.md files can hurt task success rates, while also increasing token usage.

## E2E Testing Guidelines (`test/openshift/e2e/ginkgo/**/*`)

When creating or modifying Ginkgo E2E test files:

### General Guidelines

- **Avoid `k8sClient.Update(...)`**: This call will occasionally fail due to Kubernetes resources being modified between the Get and Update calls.
- Instead, use fixture-specific `Update` functions. Most fixture packages include an `Update` function, for example for `ArgoCD` CR: use `argocdFixture.Update(...)`. For generic resource update, see `k8sFixture.Update(...)`.

### Parallel Tests (`test/openshift/e2e/ginkgo/parallel/*_test.go`)

- Use `Describe("GitOps Operator Parallel E2E Tests", func() { ... })` as the top-level describe block
- Call `fixture.EnsureParallelCleanSlate()` in the `BeforeEach` function. (not `EnsureSequentialCleanSlate`)

### Sequential Tests (`test/openshift/e2e/ginkgo/sequential/*_test.go`)

- Use `Describe("GitOps Operator Sequential E2E Tests", func() { ... })` as the top-level describe block
- Call `fixture.EnsureSequentialCleanSlate()` in the `BeforeEach` function. (not `EnsureParallelCleanSlate`)
1 change: 1 addition & 0 deletions CLAUDE.md
Loading