File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -148,6 +148,35 @@ make e2e RUN=Foo # Run tests matching "Foo"
148148> every code change. Run ` make buildimg ` followed by ` make deploy-bink ` to
149149> pick up your latest changes in the cluster.
150150
151+ ### Quarantining Flaky Tests
152+
153+ A test that is intermittently failing for reasons outside the operator's
154+ control can be quarantined so it stops blocking CI while the underlying
155+ issue is investigated:
156+
157+ ``` go
158+ func TestFlaky (t *testing .T ) {
159+ testutil.Quarantine (t, " flaky: <what fails>, <tracking issue URL>" )
160+
161+ // ... rest of the test, unchanged
162+ }
163+ ```
164+
165+ Call ` Quarantine ` first thing in the test, before any provisioning, so a
166+ skipped test costs nothing. The reason must reference an open tracking
167+ issue: that is what tells us when the quarantine can be lifted.
168+
169+ Quarantined tests are skipped via ` t.Skip ` unless ` E2E_RUN_QUARANTINED ` is
170+ set to a truthy value, so they still run on demand, for example to check
171+ whether the underlying issue has been fixed:
172+
173+ ``` shell
174+ E2E_RUN_QUARANTINED=1 make e2e RUN=TestMidRolloutImageChange
175+ ```
176+
177+ CI leaves the variable unset. Quarantine is temporary by design: remove
178+ the call once the test is reliably green again.
179+
151180### Internal Registry
152181
153182The bink cluster includes an internal container registry. From the host, push
You can’t perform that action at this time.
0 commit comments