2014-03-14 15:02:07 +00:00
|
|
|
require_relative "../../../base"
|
|
|
|
|
|
|
|
require Vagrant.source_root.join("plugins/providers/hyperv/config")
|
|
|
|
|
|
|
|
describe VagrantPlugins::HyperV::Config do
|
|
|
|
describe "#ip_address_timeout" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.ip_address_timeout = 180
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.ip_address_timeout).to eq(180)
|
|
|
|
end
|
|
|
|
it "defaults to a number" do
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.ip_address_timeout).to eq(120)
|
|
|
|
end
|
2015-03-30 17:01:38 +00:00
|
|
|
end
|
2015-05-30 18:47:23 +00:00
|
|
|
|
2015-03-30 14:37:29 +00:00
|
|
|
describe "#vlan_id" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.vlan_id = 100
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.vlan_id).to eq(100)
|
|
|
|
end
|
2014-03-14 15:02:07 +00:00
|
|
|
end
|
2015-05-30 18:47:23 +00:00
|
|
|
|
2015-09-22 10:35:55 +00:00
|
|
|
describe "#mac" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.mac = "001122334455"
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.mac).to eq("001122334455")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
2015-01-14 15:35:44 +00:00
|
|
|
describe "#vmname" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.vmname = "test"
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.vmname).to eq("test")
|
|
|
|
end
|
|
|
|
end
|
2015-05-30 18:47:23 +00:00
|
|
|
|
2015-01-14 15:35:44 +00:00
|
|
|
describe "#memory" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.memory = 512
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.memory).to eq(512)
|
|
|
|
end
|
|
|
|
end
|
2015-05-30 18:47:23 +00:00
|
|
|
|
2015-01-14 15:35:44 +00:00
|
|
|
describe "#maxmemory" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.maxmemory = 1024
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.maxmemory).to eq(1024)
|
|
|
|
end
|
|
|
|
end
|
2015-05-30 18:47:23 +00:00
|
|
|
|
2015-01-14 15:35:44 +00:00
|
|
|
describe "#cpus" do
|
|
|
|
it "can be set" do
|
|
|
|
subject.cpus = 2
|
|
|
|
subject.finalize!
|
|
|
|
expect(subject.cpus).to eq(2)
|
|
|
|
end
|
|
|
|
end
|
2014-03-14 15:02:07 +00:00
|
|
|
end
|