Fix bug with lxc-start arguments
This commit is contained in:
parent
08221913dd
commit
30ec42b36b
2 changed files with 3 additions and 3 deletions
|
@ -46,8 +46,8 @@ module Vagrant
|
|||
run :destroy, '--name', @name
|
||||
end
|
||||
|
||||
def start(configs = {})
|
||||
configs = configs.map { |key, value| ["-s", "#{key}=#{value}"] }.flatten
|
||||
def start(configs = [])
|
||||
configs = configs.map { |conf| ["-s", conf] }.flatten
|
||||
run :start, '-d', '--name', @name, *configs
|
||||
end
|
||||
|
||||
|
|
|
@ -82,7 +82,7 @@ describe Vagrant::LXC::Container::CLI do
|
|||
end
|
||||
|
||||
it 'uses provided hash to configure the container' do
|
||||
subject.start('lxc.config' => 'value', 'lxc.other' => 'value')
|
||||
subject.start(['lxc.config=value', 'lxc.other=value'])
|
||||
subject.should have_received(:run).with(:start, '-d', '--name', name,
|
||||
'-s', 'lxc.config=value',
|
||||
'-s', 'lxc.other=value'
|
||||
|
|
Loading…
Reference in a new issue