Skip to content
This repository has been archived by the owner on Jan 19, 2019. It is now read-only.

[COOK-2846] activemq cookbook does not have support for opensuse #3

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 15 additions & 0 deletions .gitignore
@@ -1,2 +1,17 @@
.vagrant
Berksfile.lock
*~
*#
.#*
\#*#
.*.sw[a-z]
*.un~
/cookbooks

# Bundler
Gemfile.lock
bin/*
.bundle/*

.kitchen/
.kitchen.local.yml
7 changes: 2 additions & 5 deletions .kitchen.yml
@@ -1,12 +1,13 @@
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true

platforms:
- name: ubuntu-12.04
driver_config:
box: canonical-ubuntu-12.04
box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
require_chef_omnibus: true
run_list: ["recipe[apt]"]
- name: ubuntu-10.04
driver_config:
Expand All @@ -17,10 +18,6 @@ platforms:
driver_config:
box: opscode-centos-6.3
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
- name: centos-5.8
driver_config:
box: opscode-centos-5.8
box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box

suites:
- name: default
Expand Down
5 changes: 5 additions & 0 deletions Gemfile
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gem 'berkshelf'
gem 'test-kitchen', '~> 1.0.0.beta.2', :group => :integration
gem 'kitchen-vagrant', :group => :integration
12 changes: 12 additions & 0 deletions Thorfile
@@ -0,0 +1,12 @@
# encoding: utf-8

require 'bundler'
require 'bundler/setup'
require 'berkshelf/thor'

begin
require 'kitchen/thor_tasks'
Kitchen::ThorTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end
2 changes: 1 addition & 1 deletion metadata.rb
Expand Up @@ -6,7 +6,7 @@
long_description IO.read(File.join(File.dirname(__FILE__), 'README.md'))
version "1.1.1"

%w{ubuntu debian redhat centos}.each do |os|
%w{ubuntu debian redhat centos suse}.each do |os|
supports os
end

Expand Down
11 changes: 0 additions & 11 deletions recipes/default.rb
Expand Up @@ -57,19 +57,8 @@
action [:enable, :start]
end

# symlink so the default wrapper.conf can find the native wrapper library
link "#{activemq_home}/bin/linux" do
to "#{activemq_home}/bin/linux-#{arch}"
end

# symlink the wrapper's pidfile location into /var/run
link "/var/run/activemq.pid" do
to "#{activemq_home}/bin/linux/ActiveMQ.pid"
not_if "test -f /var/run/activemq.pid"
end

template "#{activemq_home}/bin/linux/wrapper.conf" do
source "wrapper.conf.erb"
mode 0644
notifies :restart, 'service[activemq]'
end
14 changes: 14 additions & 0 deletions test/integration/default/serverspec/localhost/activemq_spec.rb
@@ -0,0 +1,14 @@
require 'spec_helper'

describe 'ActiveMQ server' do

it 'should have a vagrant user' do
expect(user 'vagrant').to exist
end

it 'should be running the activemq server' do
expect(service 'activemq').to be_running
expect(service 'activemq').to be_enabled
end

end
11 changes: 11 additions & 0 deletions test/integration/default/serverspec/spec_helper.rb
@@ -0,0 +1,11 @@
require 'serverspec'
require 'pathname'

include Serverspec::Helper::Exec
include Serverspec::Helper::DetectOS

RSpec.configure do |c|
c.before :all do
c.os = backend(Serverspec::Commands::Base).check_os
end
end