Repository navigation
Migrate legacy-only tests to net10.0 ahead of the tool-only 12.0 - #4450
Merged
Merged
Conversation
NUnit 3.12 supports TimeoutAttribute on netstandard2.0, so the NO_UNIT_TIMEOUTATTRIBUTE workaround only hid the timeout and cancellation tests there. PlatformAttribute still breaks the discovery of the whole module on net10.0, so NO_UNIT_PLATFORMATTRIBUTE stays.
Outside Windows Crypto.encrypt uses AES, not ProtectedData, so the ignore was stale and Linux coverage only came from the net461 pass under Mono.
The netstandard build replaced WebProxy with a hand-written IWebProxy whose IsBypassed compared the whole url with the regex patterns built from no_proxy, so no entry ever matched, and whose default proxy ignored the system settings. WebProxy and GetSystemWebProxy are part of netstandard2.0, so use them on every target. The proxy address and bypass assertions only ran on net461; they now run on net10.0 as well.
PlatformAttribute hides the whole module on net10.0, so these tests were ignored there and some ran in no CI job at all. Check the OS at run time instead: - #183 outdated flags and #1190 now run outside Windows on net10.0 - #3410 readonly obj files runs on Windows on net10.0 - #1174 Ninject conflict runs everywhere - #1743 gets its own scenario instead of the bootstrapper one Add a net10.0 test for the init command, which only had coverage through the bootstrapper test, and drop the dead TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005 and FAKE_NETSTANDARD_API defines.
Every integration test pointed Paket.Restore.targets to the build output through PaketExePath, so the branches that find a real installation had no coverage. DotnetToolSpecs installs the package the build packs and restores without PaketExePath, with paket as: - a local tool of the manifest - a tool installed with --tool-path .paket - a tool on the PATH, as a global tool is The install only uses temp/ and a packages folder of the scenario, since the global one may hold the nuget.org package of the same version. The NuGet target now runs before the integration tests; the tests are ignored locally when no package was packed, and fail on CI.
They were marked flaky on .NET Core when the suite first ran there, so once net461 is gone they would only run in the flaky job. They pass reliably on net10.0, alone and in the full suite.
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.
Paket 12.0 drops
paket.exe, the bootstrapper, Mono and thenet461target framework (see #4300). Some tests only did their real work onnet461today, sometimes in no CI job at all, while the code they cover is shared with the .NET tool. This PR moves them tonet10.0before anything is removed, so the CI still compares both frameworks while they migrate. The removal itself comes in a follow-up PR.Bug found on the way:
no_proxywas ignored by the .NET toolThe netstandard build replaced
WebProxywith a hand-writtenIWebProxy:IsBypassedcompared the whole URL with the regex patterns built fromno_proxy, so no entry ever matched;paket.exe.The tests that would have caught it skipped exactly these assertions on
net10.0(//TODO readd check).WebProxyandWebRequest.GetSystemWebProxyare part of netstandard2.0, so both targets now use them. This is the only change outside the tests, with a release note.What the .NET tool now does with
no_proxydepends on where the proxy comes from:HTTP_PROXY/HTTPS_PROXY: Paket builds the proxy and appliesno_proxyitself, as curl does. An entry matches the host and its subdomains,*alone matches every host, and a matching host is reached directly.ALL_PROXYonly: Paket hands the request to the .NET system proxy, which readsALL_PROXYand applies its ownno_proxyrules. An entry matches that exact host, a leading.matches its subdomains, and*is not supported.Tests now running on net10.0
TimeoutAttributeworks on netstandard NUnit, soNO_UNIT_TIMEOUTATTRIBUTEis gone.ProtectedData, so the ignore was stale.net461: paket outdated should optionally evaluate version constraints #183 outdated flags, Missing transitive dependencies after paket update #1190, Makes conflicts fail faster #1174, Paket failed with UnauthorizedAccessException writing to MyProject.paket.references.cached #3410 and 3.1.7: "paket install --log-file" blows up right away with IndexOutOfRangeException #1743.[<Platform>]is not usable here: onnet10.0with NUnit 3.12 it silently drops the discovery of the whole module, which I checked onUtilsSpecs. So these tests check the OS at run time instead, andNO_UNIT_PLATFORMATTRIBUTEstays for the unit tests.Platform "Mono"and ran in no CI job.paket initonnet10.0. The command was only covered through the bootstrapper test.net461is gone.TESTSUITE_KNOWN_FAILURE_DOTNETCORE_3005,FAKE_NETSTANDARD_APIandWEBPROXY_NETSTANDARD.New coverage: how Paket.Restore.targets finds the .NET tool
Every integration test pointed
Paket.Restore.targetsto the build output throughPaketExePath. As a result, the branches that find a real installation had no coverage, and they are the only ones left in 12.0.DotnetToolSpecsinstalls the package the build packs and restores a project withoutPaketExePath, with paket installed in each of these ways:--tool-path .paket;PATH, the way a global tool is.How it stays isolated:
temp/and a packages folder of the scenario, because the global one may hold the nuget.org package of the same version.dotnetnever walks up to the repository's manifest.The
NuGetbuild target now runs before the integration tests. The tests are ignored on a localdotnet testwhen no package was packed, and fail on CI, where the package is expected.Not migrated
Everything in
Paket.Bootstrapper.Testsis bootstrapper-only. Its proxy tests were the only overlap, andUtilsSpecscovers the same cases.Issue: #4300