@@ -250,6 +250,13 @@ def linux_common(config,
250
250
config . vm . provision 'markerfile' , type : 'shell' , inline : <<-SHELL
251
251
touch /etc/is_vagrant_vm
252
252
SHELL
253
+
254
+ # This prevents leftovers from previous tests using the
255
+ # same VM from messing up the current test
256
+ config . vm . provision 'clean es installs in tmp' , run : 'always' , type : 'shell' , inline : <<-SHELL
257
+ rm -rf /tmp/elasticsearch*
258
+ SHELL
259
+
253
260
sh_set_prompt config , name
254
261
sh_install_deps (
255
262
config ,
@@ -392,11 +399,6 @@ Defaults env_keep += "BATS_ARCHIVES"
392
399
SUDOERS_VARS
393
400
chmod 0440 /etc/sudoers.d/elasticsearch_vars
394
401
SHELL
395
- # This prevents leftovers from previous tests using the
396
- # same VM from messing up the current test
397
- config . vm . provision "clean_tmp" , run : "always" , type : "shell" , inline : <<-SHELL
398
- rm -rf /tmp/elasticsearch*
399
- SHELL
400
402
end
401
403
402
404
def windows_common ( config , name )
@@ -407,6 +409,10 @@ def windows_common(config, name)
407
409
New-Item C:/is_vagrant_vm -ItemType file -Force | Out-Null
408
410
SHELL
409
411
412
+ config . vm . provision 'clean es installs in tmp' , run : 'always' , type : 'shell' , inline : <<-SHELL
413
+ Remove-Item -Recurse -Force C:\\ tmp\\ elasticsearch*
414
+ SHELL
415
+
410
416
config . vm . provision 'set prompt' , type : 'shell' , inline : <<-SHELL
411
417
$ErrorActionPreference = "Stop"
412
418
$ps_prompt = 'function Prompt { "#{ name } :$($ExecutionContext.SessionState.Path.CurrentLocation)>" }'
0 commit comments