Skip to content

[Testing]: Constant XunitConsolePackageVersion set to 2.6.1 is probably never correct locally #471

Description

@ITaluone

Usage Information

Latest main

Description

NuGetPackageResolverSpecs.XunitConsolePackageVersion is set to "2.6.1", which is probably never correct nowadays.

The test TestGetGlobalInstalledPackage() fails at least for me when tests run locally, because some other projects in the past had the xunit.runner.console 2.9.3 dependency and this version is picked for this test.

This is unexpected, that other project's nuget dependencies have impact on tests on Fallout.

Reproduction Steps

  • Install xunit.runner.console 2.9.3 in any other project
  • Run NuGetPackageResolverSpecs.TestGetGlobalInstalledPackage test
  • see failing, because it expects 2.6.1 instead of 2.9.3

Expected Behavior

Test fails

Actual Behavior

Test should not be influences by other projects dependencies

Regression?

No

Known Workarounds

Use FA's BeOneOf
result.Version.OriginalVersion.Should().BeOneOf(XunitConsolePackageVersion, "2.9.3");

This will most likely be correct in the long term, because "2.9.3" is maybe the last xunit.runner.console v2 version...

This is the only way I can think of "fixing" this, despite of deleting the test...

What do you think @ChrisonSimtian @dennisdoomen ?

Could you help with a pull-request?

Yes

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions