Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

allowing merge_dict calls to correctly update the main dict #16

Merged
merged 1 commit into from May 2, 2020

Conversation

smbambling
Copy link
Contributor

This fixes a bug where the params for config_options and provider_options were not being merged in the _get_vagrant_config_dict function

Manually tested this with my remote Libvirt setup.

@smbambling
Copy link
Contributor Author

I did a force push to fix a small typo during the tests...is there a way to kick these off again ?

@ssbarnea
Copy link
Member

ssbarnea commented Mar 16, 2020

It will run again, not need to worry but if ever need to force a rebuild, you have two options: add a comment with recheck as body or close and reopen the PR. You may need to wait a little bit after that, but don't worry it will rebuild.

Also, alwats run tox -e lint before any push.

Copy link
Member

@ssbarnea ssbarnea left a comment

Choose a reason for hiding this comment

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

Please include a test that will prevent a future regression.

@smbambling
Copy link
Contributor Author

Pushed an update to fix the linting with Black.

My pytesting foo is so-so, not sure how to correctly setup the testing so that a scenario is called with test values for config/provider options. I don't know if you were thinking along the lines for a test that just looked to make sure .update( is prefixed before molecule.util.merge_dicts or a deeper test that would look at the molecule cache (~/.cache/moleulce/{role}/{scenario}/vagrant.yml) and verify the output

@apatard
Copy link
Member

apatard commented Mar 18, 2020

This is probably a silly question, but how did you notice the problem ? maybe this would help writing a test ?

@ssbarnea
Copy link
Member

Not silly at all. In fact that is the best way to add a test, verifying that the expected outcome is met. Without a test I am not going to approve it, mainly because every time I did this I soon regretted it.

@ssbarnea ssbarnea self-requested a review April 24, 2020 08:20
@ssbarnea ssbarnea added the help wanted Extra attention is needed label Apr 24, 2020
@ssbarnea
Copy link
Member

I did not approve this yet due to the lack of tests (and other reviews). Anyone is welcomed to step-in and help writing tests.

@apatard
Copy link
Member

apatard commented Apr 27, 2020

It turns out that on my quest for writing a test case for #20 not involving virtualbox (I'm trying to add vbox to the test suite but having to build a kernel module is a nightmare), I managed to write tests cases for theses two configuration options.

I'll create a pull request for them, which will fail and hopefully, by triggering again the test suite on this pull request, theses two tests will be fixed.

@apatard
Copy link
Member

apatard commented Apr 30, 2020

I've merged this tree with my tests for this commit in my branch https://github.com/apatard/molecule-vagrant/tree/mergedicts. I think it'll be easier to handle this way. I'll send a pull request once my vagrant-root branch is merged.

@ssbarnea ssbarnea added this to the 0.3 milestone May 1, 2020
@ssbarnea ssbarnea requested a review from apatard May 2, 2020 11:04
@ssbarnea ssbarnea requested a review from karcaw May 2, 2020 13:40
Copy link
Member

@apatard apatard left a comment

Choose a reason for hiding this comment

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

It's fixing real bugs and I've tested it locally. So, it's fine for me.

@ssbarnea ssbarnea added gate Gate PR in Zuul CI bug Something isn't working and removed help wanted Extra attention is needed labels May 2, 2020
@ansible-zuul ansible-zuul bot merged commit 1202d1b into ansible-community:master May 2, 2020
@karcaw karcaw mentioned this pull request Jun 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working gate Gate PR in Zuul CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants