NFS cleanup methods on destroy
This commit is contained in:
parent
dc5a1be320
commit
4472ce1879
|
@ -72,6 +72,7 @@ module Vagrant
|
|||
# destroy - Halts, cleans up, and destroys an existing VM
|
||||
destroy = Builder.new do
|
||||
use Action[:halt], :force => true
|
||||
use VM::ClearNFSExports
|
||||
use VM::DestroyUnusedNetworkInterfaces
|
||||
use VM::Destroy
|
||||
end
|
||||
|
|
|
@ -32,8 +32,8 @@ module Vagrant
|
|||
extract_folders
|
||||
|
||||
if !folders.empty?
|
||||
export_folders
|
||||
clear_nfs_exports(env)
|
||||
export_folders
|
||||
end
|
||||
|
||||
return if env.error?
|
||||
|
|
|
@ -45,8 +45,8 @@ class NFSVMActionTest < Test::Unit::TestCase
|
|||
should "call the proper sequence and succeed" do
|
||||
seq = sequence('seq')
|
||||
@instance.expects(:extract_folders).in_sequence(seq)
|
||||
@instance.expects(:export_folders).in_sequence(seq)
|
||||
@instance.expects(:clear_nfs_exports).with(@env).in_sequence(seq)
|
||||
@instance.expects(:export_folders).in_sequence(seq)
|
||||
@app.expects(:call).with(@env).in_sequence(seq)
|
||||
@instance.expects(:mount_folders).in_sequence(seq)
|
||||
@instance.call(@env)
|
||||
|
@ -69,8 +69,8 @@ class NFSVMActionTest < Test::Unit::TestCase
|
|||
|
||||
seq = sequence('seq')
|
||||
@instance.expects(:extract_folders).in_sequence(seq)
|
||||
@instance.expects(:export_folders).in_sequence(seq)
|
||||
@instance.expects(:clear_nfs_exports).in_sequence(seq)
|
||||
@instance.expects(:export_folders).in_sequence(seq)
|
||||
@app.expects(:call).never
|
||||
@instance.call(@env)
|
||||
end
|
||||
|
|
|
@ -48,6 +48,7 @@ Gem::Specification.new do |s|
|
|||
"lib/vagrant/action/vm/boot.rb",
|
||||
"lib/vagrant/action/vm/check_guest_additions.rb",
|
||||
"lib/vagrant/action/vm/clear_forwarded_ports.rb",
|
||||
"lib/vagrant/action/vm/clear_nfs_exports.rb",
|
||||
"lib/vagrant/action/vm/clear_shared_folders.rb",
|
||||
"lib/vagrant/action/vm/customize.rb",
|
||||
"lib/vagrant/action/vm/destroy.rb",
|
||||
|
@ -60,6 +61,7 @@ Gem::Specification.new do |s|
|
|||
"lib/vagrant/action/vm/match_mac_address.rb",
|
||||
"lib/vagrant/action/vm/network.rb",
|
||||
"lib/vagrant/action/vm/nfs.rb",
|
||||
"lib/vagrant/action/vm/nfs_helpers.rb",
|
||||
"lib/vagrant/action/vm/package.rb",
|
||||
"lib/vagrant/action/vm/persist.rb",
|
||||
"lib/vagrant/action/vm/provision.rb",
|
||||
|
@ -133,6 +135,7 @@ Gem::Specification.new do |s|
|
|||
"test/vagrant/action/vm/boot_test.rb",
|
||||
"test/vagrant/action/vm/check_guest_additions_test.rb",
|
||||
"test/vagrant/action/vm/clear_forwarded_ports_test.rb",
|
||||
"test/vagrant/action/vm/clear_nfs_exports_test.rb",
|
||||
"test/vagrant/action/vm/clear_shared_folders_test.rb",
|
||||
"test/vagrant/action/vm/customize_test.rb",
|
||||
"test/vagrant/action/vm/destroy_test.rb",
|
||||
|
@ -144,6 +147,7 @@ Gem::Specification.new do |s|
|
|||
"test/vagrant/action/vm/import_test.rb",
|
||||
"test/vagrant/action/vm/match_mac_address_test.rb",
|
||||
"test/vagrant/action/vm/network_test.rb",
|
||||
"test/vagrant/action/vm/nfs_helpers_test.rb",
|
||||
"test/vagrant/action/vm/nfs_test.rb",
|
||||
"test/vagrant/action/vm/package_test.rb",
|
||||
"test/vagrant/action/vm/persist_test.rb",
|
||||
|
@ -215,6 +219,7 @@ Gem::Specification.new do |s|
|
|||
"test/vagrant/action/vm/boot_test.rb",
|
||||
"test/vagrant/action/vm/check_guest_additions_test.rb",
|
||||
"test/vagrant/action/vm/clear_forwarded_ports_test.rb",
|
||||
"test/vagrant/action/vm/clear_nfs_exports_test.rb",
|
||||
"test/vagrant/action/vm/clear_shared_folders_test.rb",
|
||||
"test/vagrant/action/vm/customize_test.rb",
|
||||
"test/vagrant/action/vm/destroy_test.rb",
|
||||
|
@ -226,6 +231,7 @@ Gem::Specification.new do |s|
|
|||
"test/vagrant/action/vm/import_test.rb",
|
||||
"test/vagrant/action/vm/match_mac_address_test.rb",
|
||||
"test/vagrant/action/vm/network_test.rb",
|
||||
"test/vagrant/action/vm/nfs_helpers_test.rb",
|
||||
"test/vagrant/action/vm/nfs_test.rb",
|
||||
"test/vagrant/action/vm/package_test.rb",
|
||||
"test/vagrant/action/vm/persist_test.rb",
|
||||
|
|
Loading…
Reference in New Issue