Skip to content

Commit 3e6af08

Browse files
committed
Fix broken unit tests
1 parent 1be7a40 commit 3e6af08

File tree

1 file changed

+27
-21
lines changed

1 file changed

+27
-21
lines changed

spec/unit/provider/elasticsearch_keystore/elasticsearch_keystore_spec.rb

Lines changed: 27 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -54,13 +54,15 @@
5454
to receive(:execute).
5555
with(
5656
[executable, 'list'],
57-
custom_environment: {
58-
'ES_INCLUDE' => defaults_file,
59-
'ES_PATH_CONF' => "/etc/elasticsearch/#{instance}"
60-
},
61-
uid: 'elasticsearch',
62-
gid: 'elasticsearch',
63-
failonfail: true
57+
{
58+
custom_environment: {
59+
'ES_INCLUDE' => defaults_file,
60+
'ES_PATH_CONF' => "/etc/elasticsearch/#{instance}"
61+
},
62+
uid: 'elasticsearch',
63+
gid: 'elasticsearch',
64+
failonfail: true
65+
}
6466
).
6567
and_return(
6668
Puppet::Util::Execution::ProcessOutput.new(
@@ -118,13 +120,15 @@
118120
receive(:execute).
119121
with(
120122
[executable, 'create'],
121-
custom_environment: {
122-
'ES_INCLUDE' => '/etc/default/elasticsearch-es-03',
123-
'ES_PATH_CONF' => '/etc/elasticsearch/es-03'
124-
},
125-
uid: 'elasticsearch',
126-
gid: 'elasticsearch',
127-
failonfail: true
123+
{
124+
custom_environment: {
125+
'ES_INCLUDE' => '/etc/default/elasticsearch-es-03',
126+
'ES_PATH_CONF' => '/etc/elasticsearch/es-03'
127+
},
128+
uid: 'elasticsearch',
129+
gid: 'elasticsearch',
130+
failonfail: true
131+
}
128132
).
129133
and_return(Puppet::Util::Execution::ProcessOutput.new('', 0))
130134
)
@@ -135,13 +139,15 @@
135139
have_received(:execute).
136140
with(
137141
[executable, 'create'],
138-
custom_environment: {
139-
'ES_INCLUDE' => '/etc/default/elasticsearch-es-03',
140-
'ES_PATH_CONF' => '/etc/elasticsearch/es-03'
141-
},
142-
uid: 'elasticsearch',
143-
gid: 'elasticsearch',
144-
failonfail: true
142+
{
143+
custom_environment: {
144+
'ES_INCLUDE' => '/etc/default/elasticsearch-es-03',
145+
'ES_PATH_CONF' => '/etc/elasticsearch/es-03'
146+
},
147+
uid: 'elasticsearch',
148+
gid: 'elasticsearch',
149+
failonfail: true
150+
}
145151
)
146152
)
147153
end

0 commit comments

Comments
 (0)