Skip to content

test: fix docker-warning tests and fragile timing dependencies #1046

@Mossaka

Description

@Mossaka

Parent Issue

Part of #1039

Problem

  1. `docker-warning.test.ts` is wrapped in `describe.skip` with a stale TODO about a build issue. These 5 tests provide zero coverage.
  2. Token-unset tests rely on `sleep 7` to wait for the 5-second unsetting delay — fragile in slow CI.
  3. 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions