test: CrowdSec console enrollment E2E cases are intermittently flaky

Aberta
#2,099 0 comentários 0 reações 1 responsável Ver no GitHub

Mantenedores costumam responder em até 1 dia

@Wikid82 já está trabalhando nisso.

Desde 1/12/2026.

Avaliação

Esta issue ainda não foi avaliada.

Descrição

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).

Linguagem predominante
Go
Estrelas
17
Forks
2
Merge médio
1h 42min
PRs com merge (30d)
173

Preparar o ambiente

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de Wikid82/Charon

Todas as issues de Wikid82/Charon

Issues semelhantes

Mais issues de Go

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.