Skip to content

Move to NSubstitute 6.0.0 - #2090

Merged
NickJosevski merged 1 commit into
mainfrom
nj/nsub-6.0.0
Jul 31, 2026
Merged

Move to NSubstitute 6.0.0#2090
NickJosevski merged 1 commit into
mainfrom
nj/nsub-6.0.0

Conversation

@NickJosevski

@NickJosevski NickJosevski commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Moving to NSubstitute 6.0.0 (latest) across all nine test projects.

Standalone experiment, pushed for a CI signal only - no PR. The companion
change is #2088, which consolidates on 4.2.2 (the highest version already in
the repo). This branch instead takes all nine test projects to 6.0.0, the
current release, to find out whether the four-major jump from Calamari.Tests'
2.0.3 is viable.

Locally it looks viable. Findings:

- All nine test projects compile with 0 errors, including
  Calamari.AzureServiceFabric.Tests on net8.0-windows.
- No NSubstitute analyzer diagnostics and no obsolescence warnings. The warning
  count for Calamari.Tests is 164, identical to main - so 6.0.0 introduces none.
- Differential test run: the 907-test NSubstitute-heavy sweep (ArgoCD,
  CommitToGit, PackageRetention, StructuredVariables, Deployment.Conventions,
  Retention, Variables, ConfigurationTransforms, InputSubstitution,
  NodeExecutor, FindPackage) gives 852 passed / 46 failed / 9 skipped, with the
  set of failing test names byte-identical to pristine main. Same result as
  4.2.2 gives.
- Calamari.ConsolidateCalamariPackages.Tests gives 2 passed / 18 failed,
  matching its main baseline.

Because a green differential only proves nothing started failing - not that
assertions still assert - two NSubstitute mechanisms were mutation-tested:

- Received()/DidNotReceive(): inverting the IsEnabled branch in
  StructuredConfigurationVariablesConvention correctly failed all three tests
  in StructuredConfigurationVariablesConventionFixture, so those verifications
  are not vacuous under 6.0.0.
- When().Do() with Arg.Any matchers and ArgAt capture: TerraformPlanVariableFixture
  passes, and it is self-guarding - if the callback stopped capturing, its
  dictionary lookups would throw rather than pass silently.

Not covered locally: roughly 2,100 of Calamari.Tests' 3,036 tests, the 46
environmentally-failing and 9 skipped tests, and the cloud test projects which
need credentials. CI is the gate for those.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@NickJosevski
NickJosevski marked this pull request as ready for review July 31, 2026 04:24
@NickJosevski
NickJosevski merged commit 966eac4 into main Jul 31, 2026
35 checks passed
@NickJosevski
NickJosevski deleted the nj/nsub-6.0.0 branch July 31, 2026 04:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants