Skip to content

Update NuGet packages and share SQL Server across integration tests - #584

Merged
StuartFerguson merged 1 commit into
mainfrom
task/#583_update_nugets
Aug 31, 2026
Merged

StuartFerguson merged 1 commit into
mainfrom
task/#583_update_nugets

Conversation

@StuartFerguson

Copy link
Copy Markdown
Member

Summary

  • Update NuGet dependencies to the latest required patch versions.
  • Initialize a shared SQL Server test container once for the integration test suite.
  • Reuse the shared SQL port across controller tests and simplify test cleanup.
  • Use a safe first-match lookup when resolving the SQL Server container.

Testing

Not run (not requested)

@codacy-production

Copy link
Copy Markdown

Up to standards ✅

🟢 Issues 0 issues

Results:
0 new issues

View in Codacy

🟢 Metrics 0 duplication

Metric Results
Duplication 0

View in Codacy

NEW Get contextual insights on your PRs based on Codacy's metrics, along with PR and Jira context, without leaving GitHub. Enable AI reviewer
TIP This summary will be updated as you push new changes.

@StuartFerguson StuartFerguson linked an issue Aug 31, 2026 that may be closed by this pull request
@StuartFerguson
StuartFerguson merged commit 4335a40 into main Aug 31, 2026
5 checks passed

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 48a3deeac9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

{
await this.DockerHelper.StopContainersForScenarioRun(DockerServices.None);
}
public virtual ValueTask DisposeAsync() => default;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Delete each test database during async disposal

Each test creates a GUID-named database through EnsureCreated, but xUnit invokes this IAsyncLifetime.DisposeAsync method rather than the separate Dispose() method below, so making it a no-op leaves all 47 per-test databases in the shared SQL Server for the remainder of the run. Invoke the existing database cleanup (and dispose the client, factory, and context) here so a full suite does not continually accumulate databases and connections.

Useful? React with 👍 / 👎.

int sqlPort = dockerHelper.GetSqlPort()
?? throw new InvalidOperationException("SQL Server container did not expose port 1433.");

Instance = new IntegrationTestEnvironment(dockerHelper, sqlPort);

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Stop the shared SQL container after the test suite

When an integration-test process finishes, this static instance remains the sole owner of the Docker helper, but no assembly-level or process-level teardown calls StopContainersForScenarioRun; the prior per-test stop was removed. The SQL Server therefore keeps running in the Docker daemon after the runner exits, and its fixed IntegrationTests scenario name can collide with a subsequent local or persistent-runner invocation, so the shared environment needs suite-level cleanup.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Shared Nugets

1 participant