Skip to content

Commit

Permalink
Increase defaults to 2 CPU cores/2G ram
Browse files Browse the repository at this point in the history
Systems got more performance now, and this heavily increases the
performance while testing.
  • Loading branch information
bastelfreak committed Aug 22, 2024
1 parent 59a0859 commit 7aafaec
Show file tree
Hide file tree
Showing 6 changed files with 11 additions and 13 deletions.
6 changes: 2 additions & 4 deletions lib/beaker/hypervisor/vagrant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,7 @@ def self.cpus(host, options)
elsif options['vagrant_cpus']
options['vagrant_cpus']
else
'1'
'2'
end
end

Expand All @@ -300,10 +300,8 @@ def self.memsize(host, options)
host['vagrant_memsize']
elsif options['vagrant_memsize']
options['vagrant_memsize']
elsif /windows/.match?(host['platform'])
'2048'
else
'1024'
'2048'
end
end

Expand Down
2 changes: 1 addition & 1 deletion spec/beaker/vagrant_desktop_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
end

it 'for a set of hosts' do
expect(subject).to include(%( v.vm.provider :vmware_desktop do |v|\n v.vmx['memsize'] = '1024'\n end))
expect(subject).to include(%( v.vm.provider :vmware_desktop do |v|\n v.vmx['memsize'] = '2048'\n end))
end

context 'with whitelist_verified' do
Expand Down
2 changes: 1 addition & 1 deletion spec/beaker/vagrant_fusion_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

it 'has a provider section' do
expect(subject).to include(%( v.vm.provider :vmware_fusion do |v|\n v.vmx['memsize'] = '1024'\n end))
expect(subject).to include(%( v.vm.provider :vmware_fusion do |v|\n v.vmx['memsize'] = '2048'\n end))
end
end
end
2 changes: 1 addition & 1 deletion spec/beaker/vagrant_libvirt_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
end

it 'can specify the memory as an integer' do
expect(subject).to include('node.memory = 1024')
expect(subject).to include('node.memory = 2048')
end

it 'can specify the number of cpus' do
Expand Down
2 changes: 1 addition & 1 deletion spec/beaker/vagrant_parallels_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
end

it 'can make a Vagrantfile for a set of hosts' do
expect(subject).to include(%( v.vm.provider :parallels do |prl|\n prl.optimize_power_consumption = false\n prl.memory = '1024'\n end))
expect(subject).to include(%( v.vm.provider :parallels do |prl|\n prl.optimize_power_consumption = false\n prl.memory = '2048'\n end))
end
end

Expand Down
10 changes: 5 additions & 5 deletions spec/beaker/vagrant_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ module Beaker
v.vm.network :forwarded_port, guest: 443, host: 4443
v.vm.network :forwarded_port, guest: 8080, host: 8080
v.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024', '--cpus', '1', '--audio', 'none']
vb.customize ['modifyvm', :id, '--memory', '2048', '--cpus', '2', '--audio', 'none']
end
end
c.vm.define 'vm2' do |v|
Expand All @@ -71,7 +71,7 @@ module Beaker
v.vm.network :forwarded_port, guest: 443, host: 4443
v.vm.network :forwarded_port, guest: 8080, host: 8080
v.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024', '--cpus', '1', '--audio', 'none']
vb.customize ['modifyvm', :id, '--memory', '2048', '--cpus', '2', '--audio', 'none']
end
end
c.vm.define 'vm3' do |v|
Expand All @@ -86,7 +86,7 @@ module Beaker
v.vm.network :forwarded_port, guest: 443, host: 4443
v.vm.network :forwarded_port, guest: 8080, host: 8080
v.vm.provider :virtualbox do |vb|
vb.customize ['modifyvm', :id, '--memory', '1024', '--cpus', '1', '--audio', 'none']
vb.customize ['modifyvm', :id, '--memory', '2048', '--cpus', '2', '--audio', 'none']
end
end
end
Expand Down Expand Up @@ -264,7 +264,7 @@ module Beaker

generated_file = File.read(File.expand_path(File.join(path, 'Vagrantfile')))

match = generated_file.match(/vb.customize \['modifyvm', :id, '--memory', 'hello!', '--cpus', '1', '--audio', 'none'\]/)
match = generated_file.match(/vb.customize \['modifyvm', :id, '--memory', 'hello!', '--cpus', '2', '--audio', 'none'\]/)

expect(match).not_to be_nil
end
Expand All @@ -276,7 +276,7 @@ module Beaker

generated_file = File.read(File.expand_path(File.join(path, 'Vagrantfile')))

match = generated_file.match(/vb.customize \['modifyvm', :id, '--memory', '1024', '--cpus', 'goodbye!', '--audio', 'none'\]/)
match = generated_file.match(/vb.customize \['modifyvm', :id, '--memory', '2048', '--cpus', 'goodbye!', '--audio', 'none'\]/)

expect(match).not_to be_nil
end
Expand Down

0 comments on commit 7aafaec

Please sign in to comment.