Merge pull request #10637 from chrisroberts/f-address-config

Add base_address to core vagrant vm config
This commit is contained in:
Chris Roberts 2019-02-01 16:15:50 -08:00 committed by GitHub
commit 80705c4804
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 10 additions and 0 deletions

View File

@ -20,6 +20,7 @@ module VagrantPlugins
attr_accessor :allowed_synced_folder_types
attr_accessor :base_mac
attr_accessor :base_address
attr_accessor :boot_timeout
attr_accessor :box
attr_accessor :ignore_box_vagrantfile
@ -50,6 +51,7 @@ module VagrantPlugins
@allowed_synced_folder_types = UNSET_VALUE
@base_mac = UNSET_VALUE
@base_address = UNSET_VALUE
@boot_timeout = UNSET_VALUE
@box = UNSET_VALUE
@ignore_box_vagrantfile = UNSET_VALUE
@ -377,6 +379,7 @@ module VagrantPlugins
# Defaults
@allowed_synced_folder_types = nil if @allowed_synced_folder_types == UNSET_VALUE
@base_mac = nil if @base_mac == UNSET_VALUE
@base_address = nil if @base_address == UNSET_VALUE
@boot_timeout = 300 if @boot_timeout == UNSET_VALUE
@box = nil if @box == UNSET_VALUE
@ignore_box_vagrantfile = false if @ignore_box_vagrantfile == UNSET_VALUE

View File

@ -52,6 +52,13 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
end
end
describe "#base_address" do
it "defaults properly" do
subject.finalize!
expect(subject.base_address).to be_nil
end
end
describe "#box" do
it "is required" do
subject.box = nil