-
Notifications
You must be signed in to change notification settings - Fork 28
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
Add only those sys.paths which contain an ansible_collections directory path #322
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would be far more confident about a test that asserts the fact that a collection that is installed under sitepackages is found after making this change instead of just checking the addition of the folder to the list.
What I do not know is how we can get a collection installed there in order to perform this test.
@cidrblock Any ideas?
The reason I am asking this is because I am not sure if the addition of the path really works and I find behavior test as adding more confidence than one that only does a unit-testing.
Plz kindly take a look at this comment |
Do we really need to add isolated in condition here? |
74441ba
to
686e545
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR fixes #323 but I don't see specifically how it addresses ansible/molecule#4015. Can the title be modified please?
WRT to the change in tests, My preference is to test all permutations of the conditions evalutated in the code.
@ssbarnea You are 100% right. The test I added could be improved. The only reason to iterate sys.paths is because it exposes the site-packages directories where a full ansible might be found. I will PR a change to the test shortly. |
ansible_collections
directory
ansible_collections
directory
@cidrblock Because the issue states that the collection was installed in the site packages path which was not added to the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one comment
|
I agree with @cidrblock that this PR only fixes the issue described in #323 . And I think the issue described by @lod in ansible/molecule#4015 (comment) is fixed by #318 But the issue described by @isuftin in ansible/molecule#4015 (comment) is not related to this PR. |
Fixes: #323
Depends on #325