test: CrowdSec console enrollment E2E cases are intermittently flaky

Đang mở
#2,099 0 bình luận 0 reaction 1 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@Wikid82 đang làm issue này rồi.

Từ ngày 1/12/2026.

Đánh giá

Issue này chưa được đánh giá.

Mô tả

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

Ngôn ngữ chính
Go
Star
17
Fork
2
Merge trung bình
1 giờ 42 phút
Pull request đã merge (30 ngày)
173

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Wikid82/Charon

Tất cả issue của Wikid82/Charon

Issue tương tự

Thêm issue về Go

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.