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

Allow setting the nodeset directory through settings #93

Merged
merged 1 commit into from
Nov 28, 2017

Conversation

ekohl
Copy link
Member

@ekohl ekohl commented Nov 22, 2017

The use case is shipping a bunch of nodeset files in a gem. This allows us to change the path without having to dance with symlinks.

@puppetlabs-jenkins
Copy link
Contributor

Can one of the admins verify this patch?

@mchllweeks
Copy link
Contributor

@puppetlabs-jenkins test this please

@ferglor
Copy link
Contributor

ferglor commented Nov 27, 2017

@ekohl thanks for this. Can you update the README.md to add a listing for BEAKER_setdir under "Supported ENV variables", and also, could amend any mention of the spec/acceptance/nodesets directory to say that this is now configurable with BEAKER_setdir?

@ekohl
Copy link
Member Author

ekohl commented Nov 27, 2017

@ferglor how's this?

README.md Outdated
@@ -42,7 +42,8 @@ cd .vagrant/beaker_vagrant_files/default.yml ; vagrant destroy --force
* `BEAKER_keyfile`: specify alternate SSH key to access the test VMs
* `BEAKER_options_file`: set to the file path of the options file to be used as the default options for beaker. Equivalent to the `--options-file` parameter.
* `BEAKER_provision`: set to `no` to skip provisioning boxes before testing, beaker will then assume that boxes are already provisioned and reachable
* `BEAKER_set`: set to the name of the node file to be used during testing (exclude .yml file extension, it will be added by beaker-rspec). The file is assumed to be in module's spec/acceptance/nodesets directory.
* `BEAKER_setdir`: change the directory with nodesets. Defaults to the module's `spec/acceptance/nodesets` directroy.
Copy link
Contributor

Choose a reason for hiding this comment

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

typo "directroy" should be "directory"

Copy link
Member Author

Choose a reason for hiding this comment

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

Fixed

The use case is shipping a bunch of nodeset files in a gem. This allows
us to change the path without having to dance with symlinks.
@ferglor ferglor merged commit 4fd2a45 into voxpupuli:master Nov 28, 2017
@ekohl ekohl deleted the nodesetdir-option branch November 28, 2017 16:57
@ekohl
Copy link
Member Author

ekohl commented Nov 28, 2017

What's the policy on releases? I'd like to use a gem rather than a git checkout.

@mchllweeks
Copy link
Contributor

@ekohl I will release this today.

@matejzero
Copy link

My system just updated the beaker-rspec to latest release and my puppet beaker tests started to fail with the following error:

An error occurred while loading ./spec/acceptance/class_spec.rb.
Failure/Error: require 'beaker-rspec'
NameError:
  undefined local variable or method `dir' for main:Object
  
# /home/gitlab-runner/vendor/ruby/2.1.0/gems/beaker-rspec-6.2.2/lib/beaker-rspec/spec_helper.rb:40:in `block in <top (required)>'
# /home/gitlab-runner/vendor/ruby/2.1.0/gems/beaker-rspec-6.2.2/lib/beaker-rspec/spec_helper.rb:5:in `<top (required)>'
# /home/gitlab-runner/vendor/ruby/2.1.0/gems/beaker-rspec-6.2.2/lib/beaker-rspec.rb:5:in `require'
# /home/gitlab-runner/vendor/ruby/2.1.0/gems/beaker-rspec-6.2.2/lib/beaker-rspec.rb:5:in `<module:BeakerRSpec>'
# /home/gitlab-runner/vendor/ruby/2.1.0/gems/beaker-rspec-6.2.2/lib/beaker-rspec.rb:1:in `<top (required)>'
# ./spec/spec_helper_acceptance.rb:1:in `require'
# ./spec/spec_helper_acceptance.rb:1:in `<top (required)>'
# ./spec/acceptance/class_spec.rb:1:in `require'
# ./spec/acceptance/class_spec.rb:1:in `<top (required)>'
No examples found.

If I downgrade to 6.2.1, tests work again.

@ekohl
Copy link
Member Author

ekohl commented Nov 28, 2017

My bad. I think #94 should fix it. Could you try to see if that fixes it?

@matejzero
Copy link

Yes, that fixes it!

@mchllweeks
Copy link
Contributor

Just created a new release with that fix.

@matejzero
Copy link

I saw:) I'm already successfully running with latest version.

Thanks for a quick fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants