Skip to content

test(runtimes/dotnet): add unit and integration tests for dotnet runtime#460

Merged
jamesadevine merged 2 commits intomainfrom
copilot/add-dotnet-runtime-tests
May 8, 2026
Merged

test(runtimes/dotnet): add unit and integration tests for dotnet runtime#460
jamesadevine merged 2 commits intomainfrom
copilot/add-dotnet-runtime-tests

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented May 8, 2026

Test-gap analysis flagged the runtimes/dotnet module as having 0 direct tests for generate_dotnet_install / generate_ensure_nuget_config and no end-to-end compile coverage. Note: most DotnetExtension::validate() branches called out in the issue are already covered in src/compile/extensions/tests.rs, so this PR fills only the genuine gaps.

Summary

  • src/runtimes/dotnet/mod.rs — new #[cfg(test)] mod tests block:
    • generate_dotnet_install: default (8.0.x), explicit version, global.json sentinel (emits useGlobalJson: true, drops explicit version), case-insensitive sentinel.
    • generate_ensure_nuget_config: feed URL is interpolated into the heredoc with valid XML; default falls back to https://api.nuget.org/v3/index.json.
  • tests/compiler_tests.rs — two E2E tests modeled on test_lean_runtime_compiled_output:
    • test_dotnet_runtime_compiled_outputruntimes: dotnet: true emits UseDotNet@2, default 8.0.x, dotnet in the bash allow-list, and nuget.org in the AWF allow-domains.
    • test_dotnet_runtime_with_feed_url_compiled_outputfeed-url: additionally emits the ensure-nuget.config shim and NuGetAuthenticate@1.

No production code changed.

Test plan

  • cargo test: 1231 unit (+6) / 82 integration (+2) / 3 init / 8 mcp-http — all pass.
  • cargo clippy --all-targets --all-features — clean (only pre-existing warnings).

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • spsprodeus21.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --check-cfg /lib.rs --check-cfg cfg(feature, values()) -C metadata=212eb341856bbdc9 know�� known-linux-gnu/--error-format=json known-linux-gnu/--json=diagnostic-rendered-ansi,artifacts,future-incompat bin/rustc known-linux-gnu/cc -incompat known-linux-gnu/-Wl,--no-undefined-version bin/rustc (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc target/debug/depremote target/debug/depget-url stable-x86_64-unorigin s/li�� -linux-gnu/crti.o target/debug/deps/ado_aw-3a32340b03e006cd.0ig5wf--json=diagnostic-rendered-ansi,artifacts,futureremote stable-x86_64-REDACTED-linux-gnu/bin/rustc target/debug/depgit artifacts,futureremote target/debug/depget-url stable-x86_64-unorigin targ�� target/debug/deps/ado_aw-3a32340b03e006cd.0v3laa--error-format=json target/debug/deps/ado_aw-3a32340b03e006cd.0w908s--json=diagnostic-rendered-ansi,artifacts,futureremote stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64-REDACTED-linux-gnu/bin/cc k/ado-aw/ado-aw/git artifacts,futureremote rs -gnu/lib/libgimlorigin (dns block)
  • spsprodweu4.vssps.visualstudio.com
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 --check-cfg /lib.rs --check-cfg cfg(feature, values()) -C metadata=212eb341856bbdc9 know�� known-linux-gnu/--error-format=json known-linux-gnu/--json=diagnostic-rendered-ansi,artifacts,future-incompat bin/rustc known-linux-gnu/cc -incompat known-linux-gnu/-Wl,--no-undefined-version bin/rustc (dns block)
    • Triggering command: /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc /home/REDACTED/work/ado-aw/ado-aw/target/debug/deps/ado_aw-632c4d56de6fcebc target/debug/depremote target/debug/depget-url stable-x86_64-unorigin s/li�� -linux-gnu/crti.o target/debug/deps/ado_aw-3a32340b03e006cd.0ig5wf--json=diagnostic-rendered-ansi,artifacts,futureremote stable-x86_64-REDACTED-linux-gnu/bin/rustc target/debug/depgit artifacts,futureremote target/debug/depget-url stable-x86_64-unorigin targ�� target/debug/deps/ado_aw-3a32340b03e006cd.0v3laa--error-format=json target/debug/deps/ado_aw-3a32340b03e006cd.0w908s--json=diagnostic-rendered-ansi,artifacts,futureremote stable-x86_64-REDACTED-linux-gnu/lib/rustlib/x86_64-REDACTED-linux-gnu/bin/cc k/ado-aw/ado-aw/git artifacts,futureremote rs -gnu/lib/libgimlorigin (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Add tests for dotnet runtime gap analysis test(runtimes/dotnet): add unit and integration tests for dotnet runtime May 8, 2026
Copilot AI requested a review from jamesadevine May 8, 2026 12:16
@jamesadevine jamesadevine marked this pull request as ready for review May 8, 2026 14:27
@jamesadevine jamesadevine merged commit 64d8aaa into main May 8, 2026
26 of 32 checks passed
@jamesadevine jamesadevine deleted the copilot/add-dotnet-runtime-tests branch May 8, 2026 14:50
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.

🧪 Test gap analysis — 4 gaps found in dotnet runtime (0 tests)

2 participants