Skip to content

Commit d21167e

Browse files
authored
[TEST] Remove leftover ES temp directories before Vagrant tests (#27722)
Some of the Vagrant tests were failing due to ES temp directories left over from previous uses of the same VM confusing subsequent tests into thinking there were multiple ES installs present. This change wipes all ES temp directories when the test VMs are brought up.
1 parent 5c9415a commit d21167e

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

Vagrantfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -307,4 +307,9 @@ Defaults env_keep += "BATS_ARCHIVES"
307307
SUDOERS_VARS
308308
chmod 0440 /etc/sudoers.d/elasticsearch_vars
309309
SHELL
310+
# This prevents leftovers from previous tests using the
311+
# same VM from messing up the current test
312+
config.vm.provision "clean_tmp", run: "always", type: "shell", inline: <<-SHELL
313+
rm -rf /tmp/elasticsearch*
314+
SHELL
310315
end

0 commit comments

Comments
 (0)