Skip to content

apify call: CI test wrongly asserts schema hint on --input file-path usage error #1234

Description

@patrikbraborec

Summary

The test added in #1212test/local/lib/resolve-input.test.ts > getInputOverride > appends schema hint to --input file path errors when provided — fails on CI:

AssertionError: expected 'Error: Providing a JSON file path in …' to contain 'Run "apify actors info apify/hello-wo…'

Expected: "Run "apify actors info apify/hello-world --input" to inspect the Actor input schema."
Received: "Error: Providing a JSON file path in the --input flag is not supported. Use the "--input-file=" flag instead"

Root cause

The schema-discovery hint was intentionally not appended to the --input file-path error in src/lib/commands/resolve-input.ts. That error ("Providing a JSON file path in the --input flag is not supported. Use the --input-file= flag instead") is a usage error — the schema hint adds no value there. However, the test asserted the hint was present, so it fails on CI.

Fix

The source behavior is correct. Update the test to assert the schema hint is absent for the file-path error case (it still applies to the parse-error and object-shape-error cases).

Repro

pnpm exec vitest run test/local/lib/resolve-input.test.ts

Metadata

Metadata

Assignees

No one assigned

    Labels

    t-buildersIssues owned by the DX team.

    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