dotnet / dotnet/efcore

Improve AssertSql for non-query tests

Open
#32,190 0 comments 0 reactions 0 assignees View on GitHub
area-test
Dominant language
C#
Stars
14.8k
Forks
3.4k
PR merge metrics
PR metrics pending

Description

We're starting to have a lot of tests which don't derive from QueryTestBase, but which assert on SQL: everything deriving from NonSharedModelTestBase, JsonUpdateTestBase, etc. These use a simplified AssertSql which doesn't print a new baseline on failure, nor does it support automatic rewriting of baselines via EF_TEST_REWRITE_BASELINES=1. This makes it difficult to maintain these tests when many baselines are changed etc.

It would be great if we had the same level of AssertSql functionality for these tests.

/cc @maumar

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.