Wrap disk feature in experimental flag
This commit is contained in:
parent
86f9243762
commit
f55aca091c
|
@ -433,6 +433,11 @@ module VagrantPlugins
|
|||
# Add provider config
|
||||
disk_config.add_provider_config(provider_options, &block)
|
||||
|
||||
if !Vagrant::Util::Experimental.feature_enabled?("disk_base_config")
|
||||
@logger.warn("Disk config defined, but experimental feature is not enabled. To use this feature, enable it with the experimental flag `disk_base_config`. Disk will not be added to internal config, and will be ignored.")
|
||||
return
|
||||
end
|
||||
|
||||
@disks << disk_config
|
||||
end
|
||||
|
||||
|
|
|
@ -550,6 +550,11 @@ describe VagrantPlugins::Kernel_V2::VMConfig do
|
|||
end
|
||||
|
||||
describe "#disk" do
|
||||
before(:each) do
|
||||
allow(Vagrant::Util::Experimental).to receive(:feature_enabled?).
|
||||
with("disk_base_config").and_return("true")
|
||||
end
|
||||
|
||||
it "stores the disks" do
|
||||
subject.disk(:disk, size: 100)
|
||||
subject.disk(:disk, size: 1000, primary: false, name: "storage")
|
||||
|
|
Loading…
Reference in New Issue