Skip to content

Commit a3153ee

Browse files
committed
inspec tests for ubuntu, centos, fix rhel gpgkey
1 parent 3b0cde5 commit a3153ee

File tree

5 files changed

+29
-29
lines changed

5 files changed

+29
-29
lines changed

.kitchen.yml

Lines changed: 16 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,21 @@
1-
---
2-
driver_plugin: vagrant
1+
2+
driver:
3+
name: vagrant
4+
5+
verifier:
6+
name: inspec
7+
8+
provisioner:
9+
name: chef_zero
310

411
platforms:
5-
- name: debian-6
6-
driver_config:
7-
box: opscode-debian-6.0.7
8-
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_debian-6.0.7_chef-11.2.0.box
9-
require_chef_omnibus: 11.4.0
10-
- name: ubuntu-12.04
11-
driver_config:
12-
box: canonical-ubuntu-12.04
13-
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
14-
require_chef_omnibus: true
15-
- name: centos-6.3
16-
driver_config:
17-
box: opscode-centos-6.3
18-
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
12+
- name: ubuntu-16.04
13+
- name: debian-8.6
14+
- name: centos-6.8
15+
- name: centos-7.2
1916

2017
suites:
2118
- name: default
22-
run_list: ["recipe[virtualbox]"]
23-
attributes: {}
19+
run_list:
20+
- recipe[virtualbox]
21+
attributes:

recipes/default.rb

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@
4747
apt_repository 'oracle-virtualbox' do
4848
uri 'http://download.virtualbox.org/virtualbox/debian'
4949
key 'A2F683C52980AECF'
50-
#key 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc'
5150
distribution node['lsb']['codename']
5251
components ['contrib']
5352
end
@@ -61,7 +60,7 @@
6160
description "#{node['platform_family']} $releasever - $basearch - Virtualbox"
6261
baseurl "http://download.virtualbox.org/virtualbox/rpm/#{node['platform_family']}/$releasever/$basearch"
6362
gpgcheck true
64-
gpgkey 'http://download.virtualbox.org/virtualbox/debian/oracle_vbox_2016.asc'
63+
gpgkey 'https://www.virtualbox.org/download/oracle_vbox.asc'
6564
end
6665

6766
package "VirtualBox-#{node['virtualbox']['version']}"

spec/default_spec.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
require 'spec_helper'
22

33
describe 'virtualbox::default' do
4-
context 'on Centos 6.4 x86_64 with virtualbox 4.3' do
4+
context 'on Centos 6.8 x86_64 with virtualbox 5.1' do
55
let(:chef_run) do
6-
ChefSpec::Runner.new(platform: 'centos', version: 6.4, step_into: ['yum_repository']) do |node|
6+
ChefSpec::Runner.new(platform: 'centos', version: 6.8, step_into: ['yum_repository']) do |node|
77
node.automatic['kernel']['machine'] = 'x86_64'
8-
node.default['virtualbox']['version'] = 4.3
8+
node.default['virtualbox']['version'] = 5.1
99
end.converge(described_recipe)
1010
end
1111

test/integration/default/bats/installed.bats

Lines changed: 0 additions & 6 deletions
This file was deleted.
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
describe package('VirtualBox-5.1') do
2+
it { should be_installed }
3+
end
4+
5+
describe command('virtualbox --help') do
6+
its('exit_status') { should eq 0 }
7+
its('stdout') { should match 'Oracle VM VirtualBox Manager' }
8+
its('stderr') { should match '' }
9+
end

0 commit comments

Comments
 (0)