Allow test seeding data to be intercepted/tweaked by providers

Open
#26,068 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
35/100
Issue type
Refactor
Clarity
Mostly clear
Activity status
Stale
Tech stack
csharp, postgresql
Domain
databases, testing

Research direction

Start by reviewing the GearsOfWar, JsonQuery, ConferencePlanner, ValueConvertersEndToEnd (TestValues), and BuiltInDataTypes tests, especially the named test cases. Trace how their seed data is defined and how AssertEqualIfMapped is used. Done means providers can intercept and adjust seed data while the affected tests still verify supported types.

Written by the indexing model from the issue text.

Description

area-test

As an example, PostgreSQL does not support storing a DateTimeOffset (with non-zero offset). Since test suites such as GearsOfWar and ConferencePlanner contain such data, Npgsql needs to override and modify the data; but seed data currently isn't factored so that this can be done easily.

  • GearsOfWar, JsonQuery, ConferencePlanner
  • ValueConvertersEndToEnd: TestValues
  • BuiltInDataTypes
    • Tests like Can_insert_and_read_back_non_nullable_backed_data_types, Can_query_using_any_data_type_nullable_shadow which only work if all data types are supported exactly as-is.
    • AssertEqualIfMapped is private
    • Review the test suite in general
Dominant language
C#
Stars
14.8k
Forks
3.4k
Avg merge
2d 5h
Merged PRs (30d)
134

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from dotnet/efcore

All issues in dotnet/efcore

Similar issues

More C# issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.