Skip to content

Integration tests read docs/efcore.md and candidates.json as declared inputs, not through the repository root #344

Open

Description

@CaffeinatedCoder

Problem

Two integration-lane inputs are read at run time by walking up to the CodoMetis.ValueRanges.slnx marker:

  • FloatCheckConstraintTests reads docs/efcore.md, to hold the guide's CHECK constraints against a live server.
  • Candidates, linked from test/oracles/Candidates.cs, reads test/oracles/candidates.json.

Neither file is an MSBuild input of the integration projects. Anything derived from the project graph therefore cannot tell that the integration lane depends on them. A path rule such as "docs are inert" would skip the only test that holds docs/efcore.md's SQL against PostgreSQL. The same applies to every project that links Candidates.cs.

Change

  • Declare each file as an item of the projects that read it (<None Include="..\..\docs\efcore.md" Link="docs/efcore.md" CopyToOutputDirectory="PreserveNewest" />), and read it from AppContext.BaseDirectory.
  • Add a convention test that refuses a .slnx marker walk in any integration project and in any file linked into one. The repository rule that tests reach the root only through that marker is what makes such a walk findable.
  • Seed: put a marker walk back into an integration test. The convention test fails.

Done when

No integration project reads a repository file through the root, and the seeded walk fails the convention test.

Activity

  1. added
    tests
    package/efcore
    on Oct 20, 2026
  2. CaffeinatedCoder commented on Oct 25, 2026

    @CaffeinatedCoder
    OwnerAuthor

    One more input for this issue once PR #386 (#384) merges: test/oracles/TranslationSupport.cs is linked into the integration project and reads test/oracles/translation-support.json through the .slnx marker walk, as Candidates reads candidates.json. So TranslationSupportProbeTests depends on a file that isn't an MSBuild input of that project either. The 10.x port (#430) brings the same walk to release/10.x.

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

    package/efcoretests

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions