File tree Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Expand file tree Collapse file tree 2 files changed +31
-0
lines changed Original file line number Diff line number Diff line change 48
48
path => " cert ${clientcert} "
49
49
}
50
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
+ }
Original file line number Diff line number Diff line change
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
+ . tagged ( 'keyword_tag' )
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
You can’t perform that action at this time.
0 commit comments