Skip to content

Commit

Permalink
Merge pull request #185 from jjasghar/cloud_parity
Browse files Browse the repository at this point in the history
Updating kitchen configs and fixing tests
  • Loading branch information
JJ Asghar committed Dec 16, 2014
2 parents f8f50c5 + b43399e commit cea8634
Show file tree
Hide file tree
Showing 15 changed files with 36 additions and 96 deletions.
107 changes: 31 additions & 76 deletions .kitchen.cloud.yml
Original file line number Diff line number Diff line change
@@ -1,94 +1,49 @@
---
driver_config:
digitalocean_client_id: <%= ENV['DIGITAL_OCEAN_CLIENT_ID'] %>
digitalocean_api_key: <%= ENV['DIGITAL_OCEAN_API_KEY'] %>
aws_access_key_id: <%= ENV['AWS_ACCESS_KEY_ID'] %>
aws_secret_access_key: <%= ENV['AWS_SECRET_ACCESS_KEY'] %>
aws_ssh_key_id: <%= ENV['AWS_KEYPAIR_NAME'] %>

provisioner:
name: chef_zero
require_chef_omnibus: latest

platforms:
- name: centos-5.8
driver_plugin: digitalocean
driver_config:
image_id: 1601
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>

- name: centos-6.4
driver_plugin: digitalocean
driver_config:
image_id: 562354
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
ssh_key: <%= ENV['DIGITAL_OCEAN_SSH_KEY_PATH'] %>

- name: amazon-2013.09
driver_plugin: ec2
driver_config:
image_id: ami-3be4bc52
- name: centos-6-5-x64
driver:
name: digitalocean

- name: amazon-2014.09.01
driver:
name: ec2
image_id: ami-9a6ed3f2
username: ec2-user
ssh_key: <%= ENV['EC2_SSH_KEY_PATH'] %>

- name: debian-70
driver_plugin: digitalocean
driver_config:
image_id: 308287
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]
ssh_key: <%= ENV["EC2_SSH_KEY_PATH"] %>

- name: ubuntu-1004
driver_plugin: digitalocean
driver_config:
image_id: 14097
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: debian-7-0-x64
driver:
name: digitalocean
run_list:
- recipe[apt]

- name: ubuntu-1204
driver_plugin: digitalocean
driver_config:
image_id: 1505447
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: ubuntu-12-04-x64
driver:
name: digitalocean
run_list:
- recipe[apt]

- name: ubuntu-1304
driver_plugin: digitalocean
driver_config:
image_id: 350076
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
run_list:
- recipe[apt]

- name: ubuntu-1310
driver_plugin: digitalocean
driver_config:
image_id: 1505699
flavor_id: 63
region_id: 4
ssh_key_ids: <%= ENV['DIGITAL_OCEAN_SSH_KEY_IDS'] %>
- name: ubuntu-14-04-x64
driver:
name: digitalocean
run_list:
- recipe[apt]

suites:
- name: default
run_list:
- recipe[minitest-handler]
- recipe[rabbitmq::default]
attributes: {}
- name: default
run_list:
- recipe[rabbitmq::default]
- name: cluster
run_list:
- recipe[rabbitmq::default]
attributes:
rabbitmq:
cluster: true
cluster_disk_nodes: ['rabbit@localhost']
- name: lwrps
run_list:
- recipe[rabbitmq_test::lwrps]
2 changes: 2 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ driver:

provisioner:
name: chef_zero
require_chef_omnibus: latest

platforms:
- name: centos-6.5
- name: ubuntu-12.04
- name: ubuntu-14.04
- name: debian-7.7

suites:
- name: default
Expand Down
2 changes: 0 additions & 2 deletions spec/default_spec.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
require 'spec_helper'

describe 'rabbitmq::default' do

version = '3.4.2-1'

let(:chef_run) do
Expand Down Expand Up @@ -53,5 +52,4 @@
:source => 'rabbitmq.config.erb',
:mode => 00644)
end

end
1 change: 0 additions & 1 deletion spec/mgmt_console_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
it 'includes the `default` recipe' do
expect(chef_run).to include_recipe('rabbitmq::default')
end

end
1 change: 0 additions & 1 deletion spec/plugin_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
it 'includes the `default` recipe' do
expect(chef_run).to include_recipe('rabbitmq::default')
end

end
1 change: 0 additions & 1 deletion spec/policy_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
it 'includes the `default` recipe' do
expect(chef_run).to include_recipe('rabbitmq::default')
end

end
1 change: 0 additions & 1 deletion spec/user_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@
it 'includes the `virtualhost_management` recipe' do
expect(chef_run).to include_recipe('rabbitmq::virtualhost_management')
end

end
1 change: 0 additions & 1 deletion spec/virtualhost_management_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@
it 'includes the `default` recipe' do
expect(chef_run).to include_recipe('rabbitmq::default')
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
#

describe 'rabbitmq_test::cluster' do

it 'writes the erlang cookie file' do
file('/var/lib/rabbitmq/.erlang.cookie').must_exist
end
Expand All @@ -25,5 +24,4 @@
/^ {cluster_nodes, [.*]},$/
)
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@

file(rpm_path).wont_exist && package('rabbitmq-server').must_be_installed
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -25,5 +25,4 @@
file('/etc/apt/sources.list.d/rabbitmq-source.list').wont_exist &&
package('rabbitmq-server').must_be_installed
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,4 @@
file("#{node['rabbitmq']['config_root']}/rabbitmq-env.conf")
.must_match(/(ulimit -n #{node['rabbitmq']['open_file_limit']})/)
end

end
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,4 @@
it 'enables the rabbitmq_management_visualiser plugin' do
assert(plugin_enabled?('rabbitmq_management_visualiser'))
end

end
1 change: 1 addition & 0 deletions test/integration/helpers/rspec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@
else
c.sudo_password = ENV['SUDO_PASSWORD']
end
c.path = '/usr/local/bin'
end
9 changes: 2 additions & 7 deletions test/integration/lwrps/rspec/lwrps_spec.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
require 'spec_helper'

describe file('/usr/local/bin/rabbitmqadmin') do
it { should be_file }
it { should be_executable }
end

describe command('/usr/local/bin/rabbitmqadmin --version') do
describe command('rabbitmqadmin --version') do
it { should return_exit_status 0 }
end

describe command('/usr/local/bin/rabbitmqctl list_policies') do
describe command('rabbitmqctl list_policies') do
its(:stdout) { should match /\/\s+rabbitmq_cluster\s+queues\s+cluster\.\*\s+{"ha-mode":"all","ha-sync-mode":"automatic"}\s+0/ } # rubocop:disable all
end

0 comments on commit cea8634

Please sign in to comment.