Skip to content

Commit

Permalink
(maint) Add missing category labels on tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AdmiringWorm committed Nov 23, 2022
1 parent c8abc10 commit 031aaca
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 15 deletions.
26 changes: 15 additions & 11 deletions src/chocolatey.tests.integration/scenarios/InstallScenarios.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2017 - 2021 Chocolatey Software, Inc
// Copyright © 2017 - 2021 Chocolatey Software, Inc
// Copyright © 2011 - 2017 RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -799,6 +799,7 @@ public void should_reinstall_the_same_version_of_the_package()

[Fact]
[Pending("Does not work under .Net 4.8, See issue #2690")]
[Broken]
public void should_not_be_able_delete_the_rollback()
{
var packageDir = Path.Combine(Scenario.get_top_level(), "lib-bkp", Configuration.PackageNames);
Expand Down Expand Up @@ -1285,7 +1286,7 @@ public void config_should_match_package_result_name()
packageResult.Name.ShouldEqual(Configuration.Input);
}

[Fact]
[Fact, Pending("Current version of the NuGet client library changes this to 1.0"), Broken]
public void should_have_a_version_of_one_dot_zero_dot_zero()
{
packageResult.Version.ShouldEqual("1.0.0");
Expand Down Expand Up @@ -1390,6 +1391,7 @@ public void should_have_expected_error_in_package_result()
}
}

[Category("Side-by-Side")]
public class when_installing_a_side_by_side_package : ScenariosBase
{
private PackageResult packageResult;
Expand Down Expand Up @@ -1431,7 +1433,7 @@ public void should_put_version_in_nupkg_filename()
FileAssert.Exists(packageFile);
}

[Fact]
[Fact, Pending("Will be removed together with side by side removal"), Broken]
public void should_put_version_in_nuspec_filename()
{
var packageFile = Path.Combine(
Expand All @@ -1453,7 +1455,7 @@ public void should_not_have_nupkg_without_version_in_filename()
FileAssert.DoesNotExist(packageFile);
}

[Fact]
[Fact, Pending("Broken, will be removed together with side by side install"), Broken]
public void should_not_have_nuspec_without_version_in_filename()
{
var packageFile = Path.Combine(
Expand Down Expand Up @@ -1523,6 +1525,7 @@ public void should_have_a_version_of_one_dot_zero_dot_zero()
}
}

[Category("Side-by-Side")]
public class when_switching_a_normal_package_to_a_side_by_side_package : ScenariosBase
{
private PackageResult packageResult;
Expand Down Expand Up @@ -1566,7 +1569,7 @@ public void should_put_version_in_nupkg_filename()
FileAssert.Exists(packageFile);
}

[Fact]
[Fact, Pending("Should be removed together with side by side installation"), Broken]
public void should_put_version_in_nuspec_filename()
{
var packageFile = Path.Combine(
Expand All @@ -1588,7 +1591,7 @@ public void should_not_have_nupkg_without_version_in_filename()
FileAssert.DoesNotExist(packageFile);
}

[Fact]
[Fact, Pending("Should be removed together with side by side installation"), Broken]
public void should_not_have_nuspec_without_version_in_filename()
{
var packageFile = Path.Combine(
Expand Down Expand Up @@ -1642,6 +1645,7 @@ public void should_have_a_version_of_one_dot_zero_dot_zero()
}
}

[Category("Side-by-Side")]
public class when_installing_an_older_version_side_by_side_with_a_newer_version : ScenariosBase
{
private PackageResult packageResult;
Expand Down Expand Up @@ -1687,7 +1691,7 @@ public void should_put_version_in_nupkg_filename()
FileAssert.Exists(packageFile);
}

[Fact]
[Fact, Pending("Should be removed together with side by side installation"), Broken]
public void should_put_version_in_nuspec_filename()
{
var packageFile = Path.Combine(
Expand All @@ -1709,7 +1713,7 @@ public void should_not_have_nupkg_without_version_in_filename()
FileAssert.DoesNotExist(packageFile);
}

[Fact]
[Fact, Pending("Should be removed together with side by side installation"), Broken]
public void should_not_have_nuspec_without_version_in_filename()
{
var packageFile = Path.Combine(
Expand Down Expand Up @@ -1763,7 +1767,7 @@ public void should_have_a_version_of_one_dot_one_dot_zero()
}
}


[Category("Side-by-Side")]
public class when_switching_a_side_by_side_package_to_a_normal_package : ScenariosBase
{
private PackageResult packageResult;
Expand Down Expand Up @@ -3146,7 +3150,7 @@ public void should_not_upgrade_the_exact_version_dependency()
}
}

[Fact]
[Fact, Broken]
public void should_contain_a_message_that_it_was_unable_to_install_any_packages()
{
bool expectedMessage = false;
Expand Down Expand Up @@ -3248,7 +3252,7 @@ public void should_not_downgrade_the_exact_version_dependency()
}
}

[Fact]
[Fact, Broken]
public void should_contain_a_message_that_it_was_unable_to_install_any_packages()
{
bool expectedMessage = false;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright © 2017 - 2021 Chocolatey Software, Inc
// Copyright © 2017 - 2021 Chocolatey Software, Inc
// Copyright © 2011 - 2017 RealDimensions Software, LLC
//
// Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -455,6 +455,7 @@ public void should_uninstall_the_package_from_the_lib_directory()

[Fact]
[Pending("Does not work under .Net 4.8, See issue #2690")]
[Broken]
public void should_not_be_able_delete_the_rollback()
{
var packageDir = Path.Combine(Scenario.get_top_level(), "lib-bkp", Configuration.PackageNames);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1401,6 +1401,7 @@ public void should_upgrade_the_package()

[Fact]
[Pending("Does not work under .Net 4.8, See issue #2690")]
[Broken]
public void should_not_be_able_delete_the_rollback()
{
var packageDir = Path.Combine(Scenario.get_top_level(), "lib-bkp", Configuration.PackageNames);
Expand Down
11 changes: 10 additions & 1 deletion src/chocolatey.tests/TinySpec.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// ==============================================================================
// ==============================================================================
//
// Fervent Coder Copyright © 2011 - Released under the Apache 2.0 License
//
Expand Down Expand Up @@ -147,6 +147,15 @@ public PendingAttribute(string reason)
}
}

[AttributeUsage(AttributeTargets.Class | AttributeTargets.Method)]
public class BrokenAttribute : CategoryAttribute
{
public BrokenAttribute()
: base("Broken")
{
}
}

public class WindowsOnlyAttribute : PlatformAttribute
{
public WindowsOnlyAttribute()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ namespace chocolatey.tests.infrastructure.app.commands
using NuGet.Common;
using NuGet.Packaging;
using NuGet.Versioning;

using NUnit.Framework;

using Should;

public class ChocolateyPinCommandSpecs
Expand Down Expand Up @@ -425,7 +428,7 @@ public void should_call_nuget_service_list_run_when_command_is_list()
nugetService.Verify(n => n.list_run(It.IsAny<ChocolateyConfiguration>()), Times.Once);
}

[Pending("NuGet is killing me with extension methods. Need to find proper item to mock out to return the package object.")]
[Pending("NuGet is killing me with extension methods. Need to find proper item to mock out to return the package object."), Category("Pending")]
[Fact]
public void should_set_pin_when_command_is_add()
{
Expand All @@ -443,7 +446,7 @@ public void should_set_pin_when_command_is_add()
packageInfoService.Verify(s => s.save_package_information(It.IsAny<ChocolateyPackageInformation>()), Times.Once);
}

[Pending("NuGet is killing me with extension methods. Need to find proper item to mock out to return the package object.")]
[Pending("NuGet is killing me with extension methods. Need to find proper item to mock out to return the package object."), Category("Pending")]
[Fact]
public void should_remove_pin_when_command_is_remove()
{
Expand Down

0 comments on commit 031aaca

Please sign in to comment.