Repository navigation
test: run reading-profile SQL Server tests on Testcontainers - #1614
Draft
BenjaminMichaelis wants to merge 1 commit into
Draft
BenjaminMichaelis wants to merge 1 commit into
BenjaminMichaelis wants to merge 1 commit into
Conversation
…rver Self-provisions a pinned SQL Server container per test class instead of requiring ESSENTIALCSHARP_TEST_SQLSERVER and a CI service container. Skips when no Linux container runtime is available; fails on GitHub Linux CI so coverage cannot silently drop.
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to #1267. Adds the real-SQL-Server integration tests for the reading profile back, now self-provisioned with Testcontainers instead of an environment variable and a CI service container.
Stacked on #1267: the base is that PR's branch, because these tests exercise code that only exists there. Retarget to
mainonce #1267 merges.Why a separate PR
In #1267 these tests required
ESSENTIALCSHARP_TEST_SQLSERVERand failed when it was missing in CI. The SQL Server service container and that variable existed only on the push-only "Build and test (Ubuntu)" job, so all 8 tests failed on every OS in the PR's CI matrix (8 of 540 per job, nothing else failing).What it covers
Against a real SQL Server (SQLite serializes writers, so it cannot prove these):
AddUserReadingProfilemigration applies, reverts and reapplies; no pending model changes; expected columnsHow it works
Testcontainers.MsSql4.16.0; one container per test class with a pinned image (2022-CU20-ubuntu-22.04), disposed in the class teardown.GITHUB_ACTIONS=trueandRUNNER_OS=Linux) a failure to start the container fails the tests, so coverage cannot silently disappear.Testing
Review notes
RUNNER_OS; an explicit workflow env var would be the alternative.