Mercurial > repos > other > Puppet
annotate modules/stdlib/spec/classes/anchor_spec.rb @ 157:c6b1b42f3e4b puppet-3.6
Move all sites to separate LetsEncrypt certs to make adding future domains easier
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Thu, 30 Mar 2017 20:41:18 +0100 |
parents | addb0ea390a1 |
children |
rev | line source |
---|---|
37 | 1 #! /usr/bin/env ruby -S rspec |
2 require 'spec_helper' | |
3 require 'puppet_spec/compiler' | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
4 |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
5 describe "anchorrefresh" do |
37 | 6 include PuppetSpec::Compiler |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
7 |
37 | 8 let :transaction do |
9 apply_compiled_manifest(<<-ANCHORCLASS) | |
10 class anchored { | |
11 anchor { 'anchored::begin': } | |
12 ~> anchor { 'anchored::end': } | |
13 } | |
14 | |
15 class anchorrefresh { | |
16 notify { 'first': } | |
17 ~> class { 'anchored': } | |
18 ~> anchor { 'final': } | |
19 } | |
20 | |
21 include anchorrefresh | |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
22 ANCHORCLASS |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
23 end |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
24 |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
25 it 'propagates events through the anchored class' do |
37 | 26 resource = transaction.resource_status('Anchor[final]') |
0
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
27 |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
28 expect(resource.restarted).to eq(true) |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
29 end |
956e484adc12
Initial public release of Puppet configs
IBBoard <dev@ibboard.co.uk>
parents:
diff
changeset
|
30 end |