Set provisioner names to symbol

Because Vagrant is handling provisioner names to be symbols more
uniformly now, update the mocked tests to reflect this change. Otherwise
these provisioners will be ignored and not run.
This commit is contained in:
Brian Cain 2020-01-06 13:25:31 -08:00
parent b4c302a74c
commit ee8b38d47a
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
1 changed files with 7 additions and 7 deletions

View File

@ -107,13 +107,13 @@ describe Vagrant::Action::Builtin::Provision do
end
it "should not run if provision types are set and provisioner is not included" do
env[:provision_types] = ["other-provisioner", "other-test"]
env[:provision_types] = [:"other-provisioner", :"other-test"]
expect(hook).not_to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
it "should run if provision types are set and include provisioner name" do
env[:provision_types] = ["spec-test"]
env[:provision_types] = [:"spec-test"]
expect(hook).to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
@ -142,13 +142,13 @@ describe Vagrant::Action::Builtin::Provision do
end
it "should not run if provision types are set and provisioner is not included" do
env[:provision_types] = ["other-provisioner", "other-test"]
env[:provision_types] = [:"other-provisioner", :"other-test"]
expect(hook).not_to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
it "should run if provision types are set and include provisioner name" do
env[:provision_types] = ["spec-test"]
env[:provision_types] = [:"spec-test"]
expect(hook).to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
@ -177,13 +177,13 @@ describe Vagrant::Action::Builtin::Provision do
end
it "should not run if provision types are set and provisioner is not included" do
env[:provision_types] = ["other-provisioner", "other-test"]
env[:provision_types] = [:"other-provisioner", :"other-test"]
expect(hook).not_to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
it "should run if provision types are set and include provisioner name" do
env[:provision_types] = ["spec-test"]
env[:provision_types] = [:"spec-test"]
expect(hook).to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end
@ -192,7 +192,7 @@ describe Vagrant::Action::Builtin::Provision do
File.open(File.join(data_dir.to_s, "action_provision"), "w") do |file|
file.write("1.5:machine-id")
end
env[:provision_types] = ["spec-test"]
env[:provision_types] = [:"spec-test"]
expect(hook).to receive(:call).with(:provisioner_run, anything)
instance.call(env)
end