Skip to content

record-file-deletion e2e spec fails when STORAGE_ENABLED=false, the documented local setup #1905

Open

Description

@gdevenyi

pnpm test:e2e (and thus pnpm check) cannot pass on a machine that follows .agents/docs/playbooks/run-locally.md. Step 4 of that playbook says to set STORAGE_ENABLED=false in .env unless an S3-compatible service listens on STORAGE_ENDPOINT. With that setting, one spec always fails.

What fails

testing/src/specs/record-file-deletion.spec.ts:22:

Error: expect(received).toBe(expected)
Expected: 201
Received: 503

The spec creates a record for the ARBITRARY_SINGLE_FILE instrument. apps/api/src/instrument-records/instrument-records.service.ts:117 refuses that with 503 when storage is not enabled, so the spec stops at its first assertion. The other 404 tests pass.

Why CI does not see it

scripts/generate-env.sh leaves STORAGE_ENABLED=true, and CI passes with no storage service: StorageService.onModuleInit returns early when NODE_ENV is test, and the spec uses only the metadata endpoints.

Possible fixes

  • Skip the spec when storage is disabled, as an explicit, visible skip.
  • Or change the playbook: say that STORAGE_ENABLED=false makes this spec fail, and give the setup that makes it pass.

A copied env file does not help, because apps/api dev:test reads the repo .env directly. The spec passed locally with STORAGE_ENABLED=true in .env and a rustfs container on port 9000. I did not test STORAGE_ENABLED=true with no storage service, which is the CI configuration.

Related: #1787 (the tutorials leave storage enabled but not configured). Found while preparing #1904.

Activity

  1. added
    BugType: existing behavior is wrong
    Difficulty: LowIsolated change, about 2 hours or less
    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test tooling
    on Nov 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area: InfrastructureDeployment, Docker, CI, logging, CLIs, build and test toolingBugType: existing behavior is wrongDifficulty: LowIsolated change, about 2 hours or lessPriority: MediumReal value; schedule normally

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions