Skip to content

Commit

Permalink
test: continue when triggers fail in Vagrant
Browse files Browse the repository at this point in the history
Added the `on_error: :continue` on triggers otherwise
if we try to destroy non-started machine, it fails.

Refs: #1552
  • Loading branch information
alexandre-allard authored and gdemonet committed Oct 28, 2019
1 parent 89f57a5 commit 2d8a4e2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,8 @@ def declare_bootstrap(machine, os_data)
if os_data.fetch(:triggers_before, []).each do |trigger|
machine.trigger.before trigger[:on].to_sym,
info: trigger[:info],
run_remote: trigger[:run]
run_remote: trigger[:run],
on_error: :continue
end
end

Expand Down Expand Up @@ -336,7 +337,8 @@ Vagrant.configure("2") do |config|
if os_data.fetch(:triggers_before, []).each do |trigger|
node.trigger.before trigger[:on].to_sym,
info: trigger[:info],
run_remote: trigger[:run]
run_remote: trigger[:run],
on_error: :continue
end
end
end
Expand Down

0 comments on commit 2d8a4e2

Please sign in to comment.