Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding kitchen and chefspec and fixing package noop #38

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,5 @@ metadata.json

.sandbox
.bundle
.kitchen/
.kitchen.local.yml
20 changes: 20 additions & 0 deletions .kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
driver:
name: vagrant

provisioner:
name: chef_solo

platforms:
- name: ubuntu-12.04
- name: centos-6.4

suites:
- name: default
run_list:
- recipe[test_php-fpm::default]
attributes:
php-fpm:
pools:
- name: www
listen: '127.0.0.1:9000'
3 changes: 3 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
--default_path test/unit
--color
--format documentation
1 change: 0 additions & 1 deletion .ruby-version

This file was deleted.

4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
language: ruby
rvm:
- 2.1
bundler_args: --without integration
4 changes: 4 additions & 0 deletions Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://api.berkshelf.com"

metadata
cookbook 'test_php-fpm', path: './test/integration/cookbooks/test_php-fpm'
16 changes: 16 additions & 0 deletions Berksfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
DEPENDENCIES
php-fpm
path: .
metadata: true
test_php-fpm
path: test/integration/cookbooks/test_php-fpm

GRAPH
apt (2.3.10)
php-fpm (0.6.6)
apt (>= 0.0.0)
yum (>= 0.0.0)
test_php-fpm (0.1.0)
apt (>= 0.0.0)
php-fpm (>= 0.0.0)
yum (3.2.0)
5 changes: 3 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
source "http://rubygems.org"

gem 'rake'
gem "chef", "~> 10.12.0"
gem 'knife-ec2'
gem "chefspec"
gem "moneta", "~> 0.6.0"
gem 'stove', '~> 2.0.0'
gem 'test-kitchen'
gem 'kitchen-vagrant'
126 changes: 70 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,76 +2,73 @@ GEM
remote: http://rubygems.org/
specs:
addressable (2.3.6)
amq-protocol (1.9.2)
builder (3.2.2)
bunny (1.2.1)
amq-protocol (>= 1.9.2)
chef (10.12.0)
bunny (>= 0.6.0)
erubis
highline (>= 1.6.9)
json (>= 1.4.4, <= 1.6.1)
mixlib-authentication (>= 1.1.0)
mixlib-cli (>= 1.1.0)
mixlib-config (>= 1.1.2)
mixlib-log (>= 1.3.0)
mixlib-shellout
moneta
net-ssh (~> 2.2.2)
net-ssh-multi (~> 1.1.0)
ohai (>= 0.6.0)
chef (11.12.4)
chef-zero (~> 2.0, >= 2.0.2)
diff-lcs (~> 1.2, >= 1.2.4)
erubis (~> 2.7)
highline (~> 1.6, >= 1.6.9)
json (>= 1.4.4, <= 1.8.1)
mime-types (~> 1.16)
mixlib-authentication (~> 1.3)
mixlib-cli (~> 1.4)
mixlib-config (~> 2.0)
mixlib-log (~> 1.3)
mixlib-shellout (~> 1.4)
net-ssh (~> 2.6)
net-ssh-multi (~> 1.1)
ohai (~> 7.0.4)
pry (~> 0.9)
rest-client (>= 1.0.4, < 1.7.0)
treetop (~> 1.4.9)
uuidtools
yajl-ruby (~> 1.1)
chef-zero (2.0.2)
hashie (~> 2.0)
json
mixlib-log (~> 1.3)
rack
chefspec (3.4.0)
chef (~> 11.0)
fauxhai (~> 2.0)
rspec (~> 2.14)
coderay (1.1.0)
diff-lcs (1.2.5)
erubis (2.7.0)
excon (0.33.0)
faraday (0.8.9)
multipart-post (~> 1.2.0)
faraday_middleware (0.9.0)
faraday (>= 0.7.4, < 0.9)
fog (1.9.0)
builder
excon (~> 0.14)
formatador (~> 0.2.0)
mime-types
multi_json (~> 1.0)
net-scp (~> 1.0.4)
net-ssh (>= 2.1.3)
nokogiri (~> 1.5.0)
ruby-hmac
formatador (0.2.4)
fauxhai (2.1.2)
net-ssh
ohai
hashie (2.1.1)
highline (1.6.21)
i18n (0.6.9)
ipaddress (0.8.0)
json (1.6.1)
knife-ec2 (0.6.4)
chef (>= 0.10.10)
fog (~> 1.6)
json (1.8.1)
kitchen-vagrant (0.15.0)
test-kitchen (~> 1.0)
logify (0.2.0)
method_source (0.8.2)
mime-types (1.25.1)
minitar (0.5.4)
mixlib-authentication (1.3.0)
mixlib-log
mixlib-cli (1.4.0)
mixlib-cli (1.5.0)
mixlib-config (2.1.0)
mixlib-log (1.6.0)
mixlib-shellout (1.4.0)
moneta (0.6.0)
multi_json (1.9.2)
multipart-post (1.2.0)
net-scp (1.0.4)
net-ssh (>= 1.99.1)
net-ssh (2.2.2)
net-ssh-gateway (1.1.0)
net-ssh (>= 1.99.1)
net-ssh-multi (1.1)
net-ssh (>= 2.1.4)
net-ssh-gateway (>= 0.99.0)
nokogiri (1.5.11)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.0)
net-ssh-gateway (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-multi (1.2.0)
net-ssh (>= 2.6.5)
net-ssh-gateway (>= 1.2.0)
octokit (3.0.0)
sawyer (~> 0.5.3)
ohai (7.0.2)
ohai (7.0.4)
ipaddress
mime-types (~> 1.16)
mixlib-cli
Expand All @@ -80,14 +77,27 @@ GEM
mixlib-shellout (~> 1.2)
systemu (~> 2.5.2)
yajl-ruby
polyglot (0.3.4)
pry (0.9.12.6)
coderay (~> 1.0)
method_source (~> 0.8)
slop (~> 3.4)
rack (1.5.2)
rake (10.0.3)
rest-client (1.6.7)
mime-types (>= 1.16)
ruby-hmac (0.4.0)
rspec (2.14.1)
rspec-core (~> 2.14.0)
rspec-expectations (~> 2.14.0)
rspec-mocks (~> 2.14.0)
rspec-core (2.14.8)
rspec-expectations (2.14.5)
diff-lcs (>= 1.1.3, < 2.0)
rspec-mocks (2.14.6)
safe_yaml (1.0.3)
sawyer (0.5.4)
addressable (~> 2.3.5)
faraday (~> 0.8, < 0.10)
slop (3.5.0)
solve (0.8.2)
stove (2.0.0)
faraday (~> 0.8.9)
Expand All @@ -99,18 +109,22 @@ GEM
octokit (~> 3.0)
solve (~> 0.8)
systemu (2.5.2)
treetop (1.4.15)
polyglot
polyglot (>= 0.3.1)
uuidtools (2.1.4)
test-kitchen (1.2.1)
mixlib-shellout (~> 1.2)
net-scp (~> 1.1)
net-ssh (~> 2.7)
safe_yaml (~> 1.0)
thor (~> 0.18)
thor (0.19.1)
yajl-ruby (1.2.0)

PLATFORMS
ruby

DEPENDENCIES
chef (~> 10.12.0)
knife-ec2
chefspec
kitchen-vagrant
moneta (~> 0.6.0)
rake
stove (~> 2.0.0)
test-kitchen
7 changes: 7 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,3 +81,10 @@ EOH
sh %{ vagrant ssh }
end
end

begin
require 'kitchen/rake_tasks'
Kitchen::RakeTasks.new
rescue LoadError
puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV['CI']
end
3 changes: 2 additions & 1 deletion attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@
:name => "www"
}
]

default['php-fpm']['package_name'] = nil
default['php-fpm']['service_name'] = nil
default['php-fpm']['yum_url'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/$basearch/"
default['php-fpm']['yum_mirrorlist'] = "http://rpms.famillecollet.com/enterprise/$releasever/remi/mirror"
16 changes: 16 additions & 0 deletions test/integration/cookbooks/test_php-fpm/.kitchen.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
driver:
name: vagrant

provisioner:
name: chef_solo

platforms:
- name: ubuntu-12.04
- name: centos-6.4

suites:
- name: default
run_list:
- recipe[bar::default]
attributes:
4 changes: 4 additions & 0 deletions test/integration/cookbooks/test_php-fpm/Berksfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
source "https://api.berkshelf.com"

metadata
cookbook 'php-fpm', path: '../../../../'
4 changes: 4 additions & 0 deletions test/integration/cookbooks/test_php-fpm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# bar-cookbook

TODO: Enter the cookbook description here.

96 changes: 96 additions & 0 deletions test/integration/cookbooks/test_php-fpm/chefignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# Put files/directories that should be ignored in this file when uploading
# or sharing to the community site.
# Lines that start with '# ' are comments.

# OS generated files #
######################
.DS_Store
Icon?
nohup.out
ehthumbs.db
Thumbs.db

# SASS #
########
.sass-cache

# EDITORS #
###########
\#*
.#*
*~
*.sw[a-z]
*.bak
REVISION
TAGS*
tmtags
*_flymake.*
*_flymake
*.tmproj
.project
.settings
mkmf.log

## COMPILED ##
##############
a.out
*.o
*.pyc
*.so
*.com
*.class
*.dll
*.exe
*/rdoc/

# Testing #
###########
.watchr
.rspec
spec/*
spec/fixtures/*
test/*
features/*
Guardfile
Procfile

# SCM #
#######
.git
*/.git
.gitignore
.gitmodules
.gitconfig
.gitattributes
.svn
*/.bzr/*
*/.hg/*
*/.svn/*

# Berkshelf #
#############
Berksfile
Berksfile.lock
cookbooks/*
tmp

# Cookbooks #
#############
CONTRIBUTING
CHANGELOG*

# Strainer #
############
Colanderfile
Strainerfile
.colander
.strainer

# Vagrant #
###########
.vagrant
Vagrantfile

# Travis #
##########
.travis.yml
Loading