summaryrefslogtreecommitdiff
path: root/acceptance/data-collector
diff options
context:
space:
mode:
authorLamont Granquist <lamont@scriptkiddie.org>2017-07-10 11:33:42 -0700
committerLamont Granquist <lamont@scriptkiddie.org>2017-07-10 11:33:42 -0700
commit1d471dcedeaa694e24d1c89ed13e2ba750694575 (patch)
treee3778b3d6a48d6c3a6c5f64164b41642f935b9c5 /acceptance/data-collector
parent4a71da2a5243f343db4fadab21caf39546192031 (diff)
downloadchef-1d471dcedeaa694e24d1c89ed13e2ba750694575.tar.gz
Fix acceptance try #2lcg/fix-acceptance2
you would think i wouldn't ever write compile/converge bugs by now... Signed-off-by: Lamont Granquist <lamont@scriptkiddie.org>
Diffstat (limited to 'acceptance/data-collector')
-rw-r--r--acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb b/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb
index 2ba4fe81fc..61915c54b7 100644
--- a/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb
+++ b/acceptance/data-collector/.acceptance/data-collector-test/recipes/default.rb
@@ -1,6 +1,5 @@
-oldpath = ENV["PATH"]
-ENV["PATH"] = "/opt/chef/embedded/bin:#{ENV["PATH"]}"
+embedded_path = "/opt/chef/embedded/bin:#{ENV["PATH"]}"
api_root_dir = "/var/opt/data_collector_api"
@@ -18,6 +17,7 @@ cookbook_file ::File.join(api_root_dir, "api.rb")
execute "bundle install --binstubs" do
cwd api_root_dir
+ environment({ "PATH" => embedded_path })
end
pid_file = "/var/run/api.pid"
@@ -25,11 +25,13 @@ running_pid = ::File.exist?(pid_file) ? ::File.read(pid_file).strip : nil
execute "kill existing API process" do
command "kill #{running_pid}"
+ environment({ "PATH" => embedded_path })
not_if { running_pid.nil? }
end
execute "start API" do
command "bin/rackup -D -P #{pid_file}"
+ environment({ "PATH" => embedded_path })
cwd api_root_dir
end
@@ -40,5 +42,3 @@ directory "/etc/chef"
source "client-rb-#{config_file}.rb"
end
end
-
-ENV["PATH"] = oldpath