annotate modules/ssh/spec/spec_helper.rb @ 385:d9009f54eb23

Migrate to a fully-fledged SSH module This handles lots of the server path differences for us
author IBBoard <dev@ibboard.co.uk>
date Mon, 03 Jan 2022 17:05:54 +0000
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
385
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
1 require 'puppetlabs_spec_helper/module_spec_helper'
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
2
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
3 RSpec.configure do |config|
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
4 config.hiera_config = 'spec/fixtures/hiera/hiera.yaml'
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
5 config.before :each do
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
6 # Ensure that we don't accidentally cache facts and environment between
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
7 # test cases. This requires each example group to explicitly load the
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
8 # facts being exercised with something like
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
9 # Facter.collection.loader.load(:ipaddress)
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
10 Facter.clear
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
11 Facter.clear_messages
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
12 end
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
13 config.default_facts = {
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
14 :environment => 'rp_env',
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
15 }
d9009f54eb23 Migrate to a fully-fledged SSH module
IBBoard <dev@ibboard.co.uk>
parents:
diff changeset
16 end