-
Notifications
You must be signed in to change notification settings - Fork 18
test: fix docker-warning tests and fragile timing dependencies #1046
Copy link
Copy link
Closed
Labels
Description
Parent Issue
Part of #1039
Problem
- `docker-warning.test.ts` is wrapped in `describe.skip` with a stale TODO about a build issue. These 5 tests provide zero coverage.
- Token-unset tests rely on `sleep 7` to wait for the 5-second unsetting delay — fragile in slow CI.
- Log-command tests use `if (existsSync())` guards that silently pass when logs aren't created — masks real failures.
Acceptance Criteria
- Either fix the build issue in `docker-warning.test.ts` and enable the tests, or remove the dead `describe.skip` block entirely if the feature is already covered by `no-docker.test.ts`
- In `tests/integration/token-unset.test.ts`: Replace the fixed `sleep 7` with a more robust mechanism (e.g., retry loop checking `/proc/1/environ` with backoff, or a signal file)
- In `tests/integration/log-commands.test.ts`: Replace `if (existsSync())` guards with hard `expect(existsSync()).toBe(true)` assertions, or at minimum add `console.warn` when the check is skipped
References
- `tests/integration/docker-warning.test.ts`: Skipped tests
- `tests/integration/token-unset.test.ts`: Fragile sleep-based tests
- `tests/integration/log-commands.test.ts`: Vacuous pass guards
Closes #1039 (when combined with other sub-issues)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Type
Fields
Give feedbackNo fields configured for issues without a type.