We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent fee068a commit 40cd127Copy full SHA for 40cd127
spec/fixtures/manifests/site.pp
@@ -48,3 +48,15 @@
48
path => "cert ${clientcert}"
49
}
50
51
+
52
+node 'tags_testing' {
53
+ tag 'keyword_tag'
54
+ include sysctl::common
55
+ file { '/tmp/a':
56
+ ensure => present
57
+ }
58
+ file { '/tmp/b':
59
+ ensure => present,
60
+ tag => 'metaparam_tag'
61
62
+}
spec/hosts/tags_testing_spec.rb
@@ -0,0 +1,19 @@
1
+require 'spec_helper'
2
3
+describe 'tags_testing' do
4
+ it { should compile }
5
+ it { should contain_class('sysctl::common')
6
+ .tagged('sysctl')
7
+ .tagged('keyword_tag')
8
+ .not_tagged('no_such_tag')
9
10
+ it { should contain_file('/tmp/a')
11
12
+ .not_tagged('not_even_this')
13
+ .not_tagged('metaparam_tag')
14
15
+ it { should contain_file('/tmp/b')
16
+ .with_ensure('present')
17
+ .tagged(['keyword_tag', 'metaparam_tag'])
18
19
+end
0 commit comments