Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chocolatey package dependencies cannot be set using the ChocolateyPackSettings #1943

Closed
RichardJFoster opened this issue Dec 6, 2017 · 7 comments
Milestone

Comments

@RichardJFoster
Copy link

This problem affects Cake 0.23.0

The ChocolateyPackSettings class does not contain any mechanism to add package dependencies.

The expected operation is that the ChocolateyPackSettings has a Dependencies property that mirrors the Dependencies property already present in the NuGetPackSettings.

This problem was first observed on a 64 bit Windows system, but an examination of the source suggests this issue is not dependent on OS or build server type.

@RichardJFoster
Copy link
Author

So... I was looking at implementing this so I could submit a PR. The implementation is easy, but I am having difficulty working out how to unit test the change. It looks as if the unit tests are based on the abstract ChocolateyFixture (by way of the ChocolateyPackerFixture), but neither the ChocolateyPackerWithNuSpecFixture or the ChocolateyPackerWithoutNuSpecFixture currently appear to contain any test assertions at all. Am I looking in the right place?

@gep13
Copy link
Member

gep13 commented Dec 6, 2017

@RichardJFoster The Chocolatey Pack tests are here:

https://github.com/cake-build/cake/blob/develop/src/Cake.Common.Tests/Unit/Tools/Chocolatey/Pack/ChocolateyPackerTests.cs

Seems like you are looking in the Fixtures folder, which contains the setup logic for running the actual tests.

@gep13
Copy link
Member

gep13 commented Dec 6, 2017

If you look at this file:

https://github.com/cake-build/cake/blob/develop/src/Cake.Common.Tests/Unit/Tools/NuGet/Pack/NuGetPackerTests.cs

You will find the where the dependencies are tested in the NuGet version.

@RichardJFoster
Copy link
Author

Aha! Excellent. I was looking in the wrong place. :-) Thanks for the pointers.

@gep13
Copy link
Member

gep13 commented Dec 6, 2017

@RichardJFoster you are very welcome! Let us know if you have any questions!

@RichardJFoster
Copy link
Author

No questions for now. Just waiting on the contribution license email, but if there are comments on the PR in the mean time I'm all ears. :-)

RichardJFoster added a commit to RichardJFoster/cake that referenced this issue Dec 12, 2017
gep13 added a commit that referenced this issue Dec 12, 2017
GH1943: Allow ChocolateyPackSettings to specify dependent packages
@gep13 gep13 added this to the v0.24.0 milestone Dec 12, 2017
@devlead
Copy link
Member

devlead commented Dec 12, 2017

Fixed by #1945

@devlead devlead closed this as completed Dec 12, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants