Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
.project
.buildpath
.buildpath
.kitchen
.vagrant
66 changes: 66 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
driver_plugin: vagrant
driver_config:
require_chef_omnibus: true

platforms:
- name: ubuntu-12.04
driver_config:
box: opscode-ubuntu-12.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
- name: ubuntu-10.04
driver_config:
box: opscode-ubuntu-10.04
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
- name: centos-6.4
driver_config:
box: opscode-centos-6.4
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
- name: centos-5.9
driver_config:
box: opscode-centos-5.9
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box

suites:
- name: default
run_list:
- recipe[minitest-handler]
- recipe[sonar_test]
attributes:
sonar:
os_kernel: "linux-x86-64"
- name: database_mysql
run_list:
- recipe[minitest-handler]
- recipe[sonar_test]
- recipe[sonar_test::database_mysql]
attributes:
sonar:
os_kernel: "linux-x86-64"
jdbc_url: "jdbc:mysql://localhost:3306/sonar?useUnicode=true&characterEncoding=utf8"
jdbc_driverClassName: "com.mysql.jdbc.Driver"
jdbc_validationQuery: "select 1"
mysql:
access_ips:
- "localhost"
- "%"
mysql:
server_debian_password: "test"
server_root_password: "test"
server_repl_password: "test"
- name: proxy_nginx
run_list:
- recipe[minitest-handler]
- recipe[sonar_test]
- recipe[sonar_test::proxy_nginx]
attributes:
sonar:
os_kernel: "linux-x86-64"
- name: proxy_apache
run_list:
- recipe[minitest-handler]
- recipe[sonar_test]
- recipe[sonar_test::proxy_apache]
attributes:
sonar:
os_kernel: "linux-x86-64"
6 changes: 6 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
site :opscode

metadata

cookbook "minitest-handler"
cookbook "sonar_test", :path => "./test/cookbooks/sonar_test"
61 changes: 61 additions & 0 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
{
"sources": {
"sonar": {
"path": "."
},
"minitest-handler": {
"locked_version": "0.2.1"
},
"sonar_test": {
"path": "./test/cookbooks/sonar_test"
},
"apt": {
"locked_version": "2.1.1"
},
"openssl": {
"locked_version": "1.0.2"
},
"database": {
"locked_version": "1.4.0"
},
"mysql": {
"locked_version": "3.0.2"
},
"build-essential": {
"locked_version": "1.4.2"
},
"postgresql": {
"locked_version": "3.0.4"
},
"aws": {
"locked_version": "0.101.4"
},
"xfs": {
"locked_version": "1.1.0"
},
"apache2": {
"locked_version": "1.7.0"
},
"nginx": {
"locked_version": "1.7.0"
},
"yum": {
"locked_version": "2.3.0"
},
"runit": {
"locked_version": "1.1.6"
},
"ohai": {
"locked_version": "1.1.10"
},
"java": {
"locked_version": "1.12.0"
},
"windows": {
"locked_version": "1.10.0"
},
"chef_handler": {
"locked_version": "1.1.4"
}
}
}
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
source 'https://rubygems.org'

gem 'berkshelf'
gem 'test-kitchen', :group => :integration
gem 'kitchen-vagrant', :group => :integration
148 changes: 148 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,148 @@
GEM
remote: https://rubygems.org/
specs:
activesupport (3.2.13)
i18n (= 0.6.1)
multi_json (~> 1.0)
addressable (2.3.5)
akami (1.2.0)
gyoku (>= 0.4.0)
nokogiri (>= 1.4.0)
berkshelf (2.0.9)
activesupport (~> 3.2.0)
addressable (~> 2.3.4)
buff-shell_out (~> 0.1)
celluloid (>= 0.14.0)
chozo (>= 0.6.1)
faraday (>= 0.8.5)
hashie (>= 2.0.2)
minitar (~> 0.5.4)
rbzip2 (~> 0.2.0)
retryable (~> 1.3.3)
ridley (~> 1.5.0)
solve (>= 0.5.0)
thor (~> 0.18.0)
buff-config (0.4.0)
buff-extensions (~> 0.3)
varia_model (~> 0.1)
buff-extensions (0.5.0)
buff-ignore (1.1.0)
buff-ruby_engine (0.1.0)
buff-shell_out (0.1.0)
buff-ruby_engine (~> 0.1.0)
builder (3.2.2)
celluloid (0.14.1)
timers (>= 1.0.0)
celluloid-io (0.14.1)
celluloid (>= 0.14.1)
nio4r (>= 0.4.5)
chozo (0.6.1)
activesupport (>= 3.2.0)
hashie (>= 2.0.2)
multi_json (>= 1.3.0)
coderay (1.0.9)
erubis (2.7.0)
faraday (0.8.8)
multipart-post (~> 1.2.0)
ffi (1.7.0)
gssapi (1.0.3)
ffi (>= 1.0.1)
gyoku (1.0.0)
builder (>= 2.1.2)
hashie (2.0.5)
httpclient (2.2.0.2)
httpi (0.9.7)
rack
i18n (0.6.1)
json (1.8.0)
kitchen-vagrant (0.11.0)
test-kitchen (~> 1.0.0.beta.1)
little-plugger (1.1.3)
logging (1.6.2)
little-plugger (>= 1.1.3)
method_source (0.8.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-log (1.6.0)
mixlib-shellout (1.1.0)
multi_json (1.7.7)
multipart-post (1.2.0)
net-http-persistent (2.9)
net-scp (1.1.1)
net-ssh (>= 2.6.5)
net-ssh (2.6.7)
nio4r (0.5.0)
nokogiri (1.5.10)
nori (1.1.5)
pry (0.9.12)
coderay (~> 1.0.5)
method_source (~> 0.8)
slop (~> 3.4)
rack (1.4.5)
rbzip2 (0.2.0)
retryable (1.3.3)
ridley (1.5.2)
addressable
buff-config (~> 0.2)
buff-extensions (~> 0.3)
buff-ignore (~> 1.1)
buff-shell_out (~> 0.1)
celluloid (~> 0.14.0)
celluloid-io (~> 0.14.0)
erubis
faraday (>= 0.8.4)
hashie (>= 2.0.2)
json (>= 1.7.7)
mixlib-authentication (>= 1.3.0)
net-http-persistent (>= 2.8)
net-ssh
nio4r (>= 0.5.0)
retryable
solve (>= 0.4.4)
varia_model (~> 0.1)
winrm (~> 1.1.0)
rubyntlm (0.1.1)
safe_yaml (0.9.5)
savon (0.9.5)
akami (~> 1.0)
builder (>= 2.1.2)
gyoku (>= 0.4.0)
httpi (~> 0.9)
nokogiri (>= 1.4.0)
nori (~> 1.0)
wasabi (~> 1.0)
slop (3.4.4)
solve (0.8.1)
test-kitchen (1.0.0.beta.2)
celluloid
mixlib-shellout
net-scp
net-ssh
pry
safe_yaml (~> 0.9.3)
thor
thor (0.18.1)
timers (1.1.0)
uuidtools (2.1.4)
varia_model (0.2.0)
buff-extensions (~> 0.2)
hashie (>= 2.0.2)
wasabi (1.0.0)
nokogiri (>= 1.4.0)
winrm (1.1.2)
gssapi (~> 1.0.0)
httpclient (~> 2.2.0.2)
logging (~> 1.6.1)
nokogiri (~> 1.5.0)
rubyntlm (~> 0.1.1)
savon (= 0.9.5)
uuidtools (~> 2.1.2)

PLATFORMS
ruby

DEPENDENCIES
berkshelf
kitchen-vagrant
test-kitchen
11 changes: 11 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,25 @@ See `attributes/default.rb` for details.
The cookbook installs sonar with derby database (default).
Inlcude a `proxy_*` recipe to your `run_list` to access sonar over a proxy server.

# RUNNING TESTS:

You'll need the following installed:
* VirtualBox - https://www.virtualbox.org (tested with 4.2.16)
* Vagrant - http://www.vagrantup.com (tested with 1.2.4)
* The following gems:
* `gem install test-kitchen --pre` (tested with 1.0.0.beta.2)
* `gem install berkshelf` (tested with 2.0.10)
* `gem install kitchen-vagrant` (tested with 0.11.0)
* The following Vagrant plugins:
* `vagrant plugin install vagrant-berkshelf` (tested with 1.3.3)
* `vagrant plugin install vagrant-omnibus` (tested with 1.1.0)
* `vagrant plugin install vagrant-vbguest` (tested with 0.8.0)

Running the tests:
* `kitchen list` will list test suites on various platforms.
* `kitchen test` will run ALL the tests.
* `kitchen test TEST_NAME` (e.g. `kitchen test default-centos-64`) will run only that given test.

# Todos

* Implement `dir` attribute to make installation path more flexible
Expand Down
12 changes: 12 additions & 0 deletions Thorfile
Original file line number Diff line number Diff line change
@@ -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
Loading