File tree 1 file changed +17
-10
lines changed
test/integration/helpers/serverspec
1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change 61
61
it { should be_owned_by 'elasticsearch' }
62
62
end
63
63
64
- describe file ( '/etc/init.d/node1_elasticsearch' ) do
65
- it { should be_file }
66
- end
67
-
68
64
#test we started on the correct port was used
69
65
describe command ( 'curl -s "localhost:9201"' ) do
70
66
#TODO: This is returning an empty string
87
83
end
88
84
end
89
85
90
-
91
86
describe file ( '/etc/init.d/elasticsearch' ) do
92
87
it { should_not exist }
93
88
end
108
103
it { should_not exist }
109
104
end
110
105
111
- #Not copied on Debian 8
112
- #describe file('/usr/lib/systemd/system/node1_elasticsearch.service') do
113
- # it { should be_file }
114
- # it { should contain 'LimitMEMLOCK=infinity' }
115
- #end
116
106
107
+ #Init vs Systemd tests
108
+ #Ubuntu 15 and up
109
+ #Debian 8 and up
110
+ #Centos 7 and up
111
+
112
+ if ( ( os [ :family ] == 'centos' && os [ :release ] . to_f >= 7.0 ) ||
113
+ ( os [ :family ] == 'ubuntu' && os [ :release ] . to_f >= 15.0 ) ||
114
+ ( os [ :family ] == 'debian' && os [ :release ] . to_f >= 8.0 ) )
115
+ describe file ( '/usr/lib/systemd/system/node1_elasticsearch.service' ) do
116
+ it { should be_file }
117
+ it { should contain 'LimitMEMLOCK=infinity' }
118
+ end
119
+ else
120
+ describe file ( '/etc/init.d/node1_elasticsearch' ) do
121
+ it { should be_file }
122
+ end
123
+ end
117
124
end
118
125
You can’t perform that action at this time.
0 commit comments