Add vagrantfile mock to iso_env machine

This commit is contained in:
Brian Cain 2019-09-11 09:17:14 -07:00
parent e820b5df8e
commit d4002aa74d
No known key found for this signature in database
GPG Key ID: 9FC4639B2E4510A0
4 changed files with 4 additions and 12 deletions

View File

@ -23,6 +23,7 @@ describe VagrantPlugins::DockerProvider::Action::ConnectNetworks do
let(:machine) do
iso_env.machine(iso_env.machine_names[0], :docker).tap do |m|
allow(m).to receive(:vagrantfile).and_return(vagrantfile)
allow(m).to receive(:config).and_return(machine_config)
allow(m).to receive(:id).and_return("12345")
allow(m.provider).to receive(:driver).and_return(driver)
@ -65,10 +66,6 @@ describe VagrantPlugins::DockerProvider::Action::ConnectNetworks do
subject { described_class.new(app, env) }
before do
allow(driver).to receive(:execute) { |*args| @cmd = args.join(' ') }
end
after do
sandbox.close
end

View File

@ -22,6 +22,7 @@ describe VagrantPlugins::DockerProvider::Action::DestroyNetwork do
let(:machine) do
iso_env.machine(iso_env.machine_names[0], :docker).tap do |m|
allow(m).to receive(:vagrantfile).and_return(vagrantfile)
allow(m).to receive(:config).and_return(machine_config)
allow(m.provider).to receive(:driver).and_return(driver)
allow(m.config.vm).to receive(:networks).and_return(networks)
@ -54,10 +55,6 @@ describe VagrantPlugins::DockerProvider::Action::DestroyNetwork do
subject { described_class.new(app, env) }
before do
allow(driver).to receive(:execute) { |*args| @cmd = args.join(' ') }
end
after do
sandbox.close
end

View File

@ -28,6 +28,7 @@ describe VagrantPlugins::DockerProvider::Action::Login do
allow(m).to receive(:id).and_return("12345")
allow(m).to receive(:config).and_return(machine_config)
allow(m).to receive(:provider_config).and_return(provider_config)
allow(m).to receive(:vagrantfile).and_return(vagrantfile)
allow(m.provider).to receive(:driver).and_return(driver)
allow(m.provider).to receive(:host_vm?).and_return(false)
end
@ -42,10 +43,6 @@ describe VagrantPlugins::DockerProvider::Action::Login do
subject { described_class.new(app, env) }
before do
allow(driver).to receive(:execute) { |*args| @cmd = args.join(' ') }
end
after do
sandbox.close
end

View File

@ -22,6 +22,7 @@ describe VagrantPlugins::DockerProvider::Action::PrepareNetworks do
let(:machine) do
iso_env.machine(iso_env.machine_names[0], :docker).tap do |m|
allow(m).to receive(:vagrantfile).and_return(vagrantfile)
allow(m).to receive(:config).and_return(machine_config)
allow(m.provider).to receive(:driver).and_return(driver)
allow(m.config.vm).to receive(:networks).and_return(networks)