From addebfc654edc450b1beb50e0ddf87059daecc7a Mon Sep 17 00:00:00 2001 From: David Roberts Date: Fri, 8 Dec 2017 13:14:52 +0000 Subject: [PATCH 1/2] [TEST] Remove leftover ES temp directories before Vagrant tests 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. --- Vagrantfile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Vagrantfile b/Vagrantfile index 021b4d630a1e6..6a7dee8eae1ce 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -307,4 +307,9 @@ Defaults env_keep += "BATS_ARCHIVES" SUDOERS_VARS chmod 0440 /etc/sudoers.d/elasticsearch_vars SHELL + # This prevents leftovers from previous tests using the + # same VM from messing up the current test + config.vm.provision "clean_tmp", run: "always", type: "shell", inline: <<-SHELL + rm -rf /tmp/elastic*earch* + SHELL end From c5ddf9f49c24b161c2deb24c0e7855a5d6a61b53 Mon Sep 17 00:00:00 2001 From: David Roberts Date: Fri, 8 Dec 2017 17:30:24 +0000 Subject: [PATCH 2/2] Change * to s now typo in elasticsearch-env is corrected --- Vagrantfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile b/Vagrantfile index 6a7dee8eae1ce..6ace825e5c36b 100644 --- a/Vagrantfile +++ b/Vagrantfile @@ -310,6 +310,6 @@ SUDOERS_VARS # This prevents leftovers from previous tests using the # same VM from messing up the current test config.vm.provision "clean_tmp", run: "always", type: "shell", inline: <<-SHELL - rm -rf /tmp/elastic*earch* + rm -rf /tmp/elasticsearch* SHELL end