Skip to content

Commit

Permalink
Merge branch 'stable'
Browse files Browse the repository at this point in the history
* stable:
  (GH-1837) update behavior scenarios
  (version) 0.10.15
  (doc) update release notes for 0.10.15
  (maint) formatting
  (GH-1837) Specs: ensure zero results on info/exact
  (spec) adding additional checks
  • Loading branch information
ferventcoder committed Jun 3, 2019
2 parents 0f86f78 + 53a2592 commit c57829c
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .uppercut
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
<property name="version.minor" value="10" overwrite="false" />
<property name="version.patch" value="15" overwrite="false" />
<property name="version.fix" value="0" overwrite="false" />
<property name="version.nuget.prerelease" value="beta" overwrite="false" />
<property name="version.use.build_date" value="true" overwrite="false" />
<property name="version.nuget.prerelease" value="" overwrite="false" />
<property name="version.use.build_date" value="false" overwrite="false" />
<property name="assembly.description" value="${project.name} is a product of ${company.name} - All Rights Reserved." overwrite="false" />
<property name="assembly.copyright" value="Copyright © 2017 - 2019 ${company.name} Copyright © 2011 - 2017, RealDimensions Software, LLC - All Rights Reserved." overwrite="false" />
<property name="sign.project_with_key" value="true" overwrite="false" />
Expand Down
7 changes: 6 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,14 @@ This covers changes for the "chocolatey" and "chocolatey.lib" packages, which ar

**NOTE**: If you have a licensed edition of Chocolatey ("chocolatey.extension"), refer to this in tandem with [Chocolatey Licensed CHANGELOG](https://github.com/chocolatey/choco/blob/master/CHANGELOG_LICENSED.md).

## [0.10.15](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.15+is%3Aclosed) (June 3, 2019)
### BUG FIXES
* Fix - list/search/info - searching with --exact or info results in Object reference not set to an instance of an object - see [#1837](https://github.com/chocolatey/choco/issues/1837)


## [0.10.14](https://github.com/chocolatey/choco/issues?q=milestone%3A0.10.14+is%3Aclosed) (May 30, 2019)
### BUG FIXES
* Fix - feature - Turn off Enhanced Exit Codes by Default - see [#1784](https://github.com/chocolatey/choco/issues/1784)
* Fix - feature - Turn off Enhanced Exit Codes by default - see [#1784](https://github.com/chocolatey/choco/issues/1784)
* Fix - Reboot - Pending File Rename Operations check returns true, even after reboot - see [#1768](https://github.com/chocolatey/choco/issues/1768)
* Fix - ".registry.bad" files are created for actually valid registry snapshots - see [#1581](https://github.com/chocolatey/choco/issues/1581)
* Fix - repositories - Azure DevOps NuGet v2 endpoints don't provide metadata in Packages() queries - fails on "Authors is required." - see [#1771](https://github.com/chocolatey/choco/issues/1771)
Expand Down
12 changes: 11 additions & 1 deletion Scenarios.md
Original file line number Diff line number Diff line change
Expand Up @@ -400,7 +400,7 @@
* should not have inconclusive package result
* should not have warning package result

### ChocolateyListCommand [ 10 Scenario(s), 41 Observation(s) ]
### ChocolateyListCommand [ 11 Scenario(s), 48 Observation(s) ]

#### when listing local packages

Expand Down Expand Up @@ -453,7 +453,17 @@
* should contain a summary
* should contain debugging messages
* should contain packages and versions with a space between them
* should find exactly one result
* should not contain packages that do not match
* should not error

#### when searching for an exact package with zero results

* should contain a summary
* should contain debugging messages
* should not contain packages that do not match
* should not error
* should not have any results

#### when searching packages with no filter happy path

Expand Down
68 changes: 68 additions & 0 deletions src/chocolatey.tests.integration/scenarios/ListScenarios.cs
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,18 @@ public override void Because()
Results = Service.list_run(Configuration).ToList();
}

[Fact]
public void should_not_error()
{
// nothing necessary here
}

[Fact]
public void should_find_exactly_one_result()
{
Results.Count.ShouldEqual(1);
}

[Fact]
public void should_contain_packages_and_versions_with_a_space_between_them()
{
Expand All @@ -476,6 +488,62 @@ public void should_contain_a_summary()
MockLogger.contains_message("packages found").ShouldBeTrue();
}

[Fact]
public void should_contain_debugging_messages()
{
MockLogger.contains_message("Searching for package information", LogLevel.Debug).ShouldBeTrue();
MockLogger.contains_message("Running list with the following filter", LogLevel.Debug).ShouldBeTrue();
MockLogger.contains_message("Start of List", LogLevel.Debug).ShouldBeTrue();
MockLogger.contains_message("End of List", LogLevel.Debug).ShouldBeTrue();
}
}

[Concern(typeof(ChocolateyListCommand))]
public class when_searching_for_an_exact_package_with_zero_results : ScenariosBase
{
public override void Context()
{
Configuration = Scenario.list();
Scenario.reset(Configuration);
Scenario.add_packages_to_source_location(Configuration, "exactpackage*" + Constants.PackageExtension);
Service = NUnitSetup.Container.GetInstance<IChocolateyPackageService>();

Configuration.ListCommand.Exact = true;
Configuration.Input = Configuration.PackageNames = "exactpackage123";
}

public override void Because()
{
MockLogger.reset();
Results = Service.list_run(Configuration).ToList();
}


[Fact]
public void should_not_error()
{
// nothing necessary here
}


[Fact]
public void should_not_have_any_results()
{
Results.Count.ShouldEqual(0);
}

[Fact]
public void should_not_contain_packages_that_do_not_match()
{
MockLogger.contains_message("exactpackage.dontfind").ShouldBeFalse();
}

[Fact]
public void should_contain_a_summary()
{
MockLogger.contains_message("packages found").ShouldBeTrue();
}

[Fact]
public void should_contain_debugging_messages()
{
Expand Down

0 comments on commit c57829c

Please sign in to comment.