test: CrowdSec console enrollment E2E cases are intermittently flaky

Ouverte
#2,099 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@Wikid82 y travaille déjà.

Depuis le 1/12/2026.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

crowdsec security testing

What

Several cases in tests/security/crowdsec-console-enrollment.spec.ts fail intermittently when the whole file runs under the security-tests project, then pass on an isolated re-run.

Where

tests/security/crowdsec-console-enrollment.spec.ts, cases:

  • "should send a forced request without asking for the acknowledgement" (toast not found)
  • "should require a token before retrying" (text not visible)
  • "should clear the state once confirmed..." (status label stays "Status: enrolled" for 5s)
  • "should show an error toast and keep the state when clearing fails" (toast not found)

Evidence

One full-file run had 4 failures. A copy of the spec from development had 1 failure on the same "clear the state" assertion. A second full-file run passed (35 passed, 2 skipped). The success handler of useClearConsoleEnrollment invalidates crowdsec-console-status, so the code path looks correct; the cause looks like timing between the stubbed status response and the refetch.

Severity

Low (test stability only).

Suggested approach

Wait on the status request that follows the clear action before asserting the label, and wait for the toast with an explicit response wait rather than a fixed timeout.

Found while working on the encrypted-secrets branch (not yet a PR).

Langage dominant
Go
Étoiles
17
Forks
2
Merge moyen
1 h 42 min
PR mergées (30 j)
173

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de Wikid82/Charon

Toutes les issues de Wikid82/Charon

Issues similaires

Plus d'issues Go

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.