Skip to content

Pin the Nitro CLI test culture and add the xUnit runner schema - #10698

Merged
glen-84 merged 1 commit into
mainfrom
gai/pin-nitro-cli-test-culture
Oct 26, 2026
Merged

glen-84 merged 1 commit into
mainfrom
gai/pin-nitro-cli-test-culture

Conversation

@glen-84

@glen-84 glen-84 commented Oct 26, 2026

Copy link
Copy Markdown
Member

Summary

  • The Nitro CLI tests now run under the invariant culture, set through a new xunit.runner.json. Under a culture such as en-ZA, 12 of them failed: the filter tests formatted floats as 2,5, and the help snapshots rendered the --since and --until defaults as 2025/12/31 …. The CLI itself keeps formatting with the user's culture.
  • Every xunit.runner.json now references the xUnit runner schema (https://xunit.net/schema/current/xunit.runner.schema.json) for editor completion, and lists one setting per line.

Test plan

  • With LANG=en_ZA.UTF-8, the 12 Nitro CLI tests fail without the runner config and pass with it, on net8.0, net9.0, net10.0, and net11.0.
  • The full Nitro.CommandLine.Tests suite passes on net10.0 with LANG=en_ZA.UTF-8.
  • Every xunit.runner.json parses as JSON.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

No unresolved review comments were identified, and all approval-readiness assessments recommend approval.

No open issues 🎉

What changed in this PR

This pull request makes Nitro CLI tests deterministic across host cultures and standardizes xUnit runner configuration with schema references and consistent formatting.

Changes:

  • Adds invariant-culture execution for Nitro CLI tests.
  • Copies the Nitro xUnit configuration to the test output directory.
  • Adds xUnit schema metadata and one-setting-per-line formatting to existing runner configurations.
File Description
src/​Nitro/​CommandLine/​test/​CommandLine.Tests/​xunit.runner.json Configures invariant culture and references the xUnit schema.
src/​Nitro/​CommandLine/​test/​CommandLine.Tests/​Nitro.CommandLine.Tests.csproj Copies the runner configuration to test output.
src/​Mocha/​test/​Mocha.Analyzers.Tests/​xunit.runner.json Adds the xUnit schema reference.
src/​HotChocolate/​Utilities/​test/​Utilities.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​Language/​test/​Language.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​Core/​test/​Validation.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​Core/​test/​Types.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​Core/​test/​Types.Analyzers.Tests/​xunit.runner.json Adds the xUnit schema reference.
src/​HotChocolate/​Core/​test/​Fetching.Tests/​xunit.runner.json Adds the xUnit schema reference.
src/​HotChocolate/​Core/​test/​Execution.Abstractions.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​Core/​test/​Abstractions.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​AspNetCore/​test/​AspNetCore.Tests/​xunit.runner.json Adds schema metadata and separates runner settings.
src/​HotChocolate/​AspNetCore/​test/​AspNetCore.Tests.Utilities/​xunit.runner.json Adds schema metadata and separates runner settings.

Review effort: Lite

@github-actions

Copy link
Copy Markdown
Contributor

✅ Nitro CLI E2E snapshots: no flow recordings changed vs main.

@glen-84
glen-84 merged commit 7d77e09 into main Oct 26, 2026
161 checks passed
@glen-84
glen-84 deleted the gai/pin-nitro-cli-test-culture branch October 26, 2026 15:40
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.

2 participants