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

simplify packages version detection #618

Closed

Conversation

maxadamo
Copy link
Contributor

@maxadamo maxadamo commented Aug 1, 2021

Pull Request (PR) description

Simplify packages version detection

This Pull Request (PR) fixes the following issues

Fixes #617

@smortex smortex assigned smortex and unassigned smortex Aug 1, 2021
Comment on lines 101 to 104
describe command('/opt/test-venv/bin/pip show agent') do
its(:exit_status) { is_expected.to eq 1 }
its(:stdout) { is_expected.not_to match %r{WARNING: Package\(s\) not found: agent} }
end
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Testing that something does not work in acceptance tests is a bit awkward because you have to test for the very exact error you are expecting. Here, Puppet cannot apply the catalog (because no package exist with this name and version) so the test should ensure that this is the exact error we are seeing.

It is probably easier to do a unit test in spec/defines/pip_spec.rb: setup python::pip with your parameters and ensure that the expected resources are declared with the expected parameters.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@smortex I understand, but there is a problem. Indico is an application made by CERN, but we are customizing it, and those version numbers come from a colleague of mines. Unfortunately, they're not available in a public repository and they can't be used for this test.
On another note, this is the first time that I see "Github Actions", and the problem is that it's set to run on PRs, and I can't seem to find a way to run the test on my forked repo. I'll investigate a bit more.

@maxadamo maxadamo force-pushed the fix-package-version-detection branch 2 times, most recently from 67a150e to f119bb6 Compare August 1, 2021 13:34
@maxadamo
Copy link
Contributor Author

maxadamo commented Aug 1, 2021

I squashed the commits and fixed the CI.

@maxadamo maxadamo force-pushed the fix-package-version-detection branch from f119bb6 to 9a1fd26 Compare August 1, 2021 13:39
@vox-pupuli-tasks
Copy link

Dear @maxadamo, thanks for the PR!

This is Vox Pupuli Tasks, your friendly Vox Pupuli GitHub Bot. I noticed that your pull request contains merge conflict. Can you please rebase?

You can find my sourcecode at voxpupuli/vox-pupuli-tasks

@deric
Copy link

deric commented Oct 9, 2024

@maxadamo Any progress on this?

@maxadamo
Copy link
Contributor Author

@deric for me this change is working and it solves a real problem. I try to rebase and solve the conflicts ASAP.

@maxadamo
Copy link
Contributor Author

@deric and @smortex I created a new PR #703 which replaces this one.

@maxadamo maxadamo closed this Oct 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ensure not detecting a pip version
3 participants