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

Agx hiera fixtures #125

Merged
merged 3 commits into from Dec 4, 2013

Conversation

Projects
None yet
2 participants
@rodjek
Owner

rodjek commented Dec 4, 2013

Pulls in #91, updates it to merge into master and then fixed build errors on older Puppet versions that it introduces.

agx and others added some commits Mar 29, 2013

Allow to set up hiera test fixtures
Currently puppet reads hiera settings from a randomly created vardir or
from puppet config. For proper test fixtrues allow it to be set either
via RSpec.configuration or via :hiera_config in specific examples e.g.:

spec/fixtures/hiera/hiera.yaml:
  ---
  :backends:
    - yaml
  :hierarchy:
    - test

   :yaml:
      :datadir: 'spec/fixtures/hiera'

spec/fixtures/hiera/test.yaml:
  foovar: 'bar'

spec/spec_helper.rb:
  RSpec.configure do |c|
    ...
    c.hiera_config = File.join(fixture_path, 'hiera/hiera.yaml')
    ...
  end

This make testing modules with hiera lookups very simple.
Merge branch 'hiera_fixtures' of https://github.com/agx/rspec-puppet
…into agx-hiera_fixtures

Conflicts:
	lib/rspec-puppet.rb
	lib/rspec-puppet/example/class_example_group.rb
	lib/rspec-puppet/example/define_example_group.rb
	lib/rspec-puppet/example/host_example_group.rb
Check if a setting exists before setting it
hiera_config doesn't exist in Puppet < 3.x

rodjek pushed a commit that referenced this pull request Dec 4, 2013

@rodjek rodjek merged commit 2388b0f into master Dec 4, 2013

@rodjek rodjek deleted the agx-hiera_fixtures branch Dec 4, 2013

@rodjek rodjek referenced this pull request Dec 4, 2013

Closed

Support Hiera #68

@rodjek rodjek added this to the 1.0.0 milestone Sep 29, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment