Skip to content

Commit 27f3b34

Browse files
committed
Add Test Kitchen, ChefSpec, RuboCop, and Foodcritic on Travis CI
Signed-off-by: Seth Vargo <[email protected]>
1 parent e412e32 commit 27f3b34

File tree

31 files changed

+850
-699
lines changed

31 files changed

+850
-699
lines changed

.gitignore

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,21 @@
1-
.bundle
2-
.cache
3-
.kitchen
4-
bin
5-
*.sw[op]
6-
1+
*~
2+
*#
3+
.#*
4+
\#*#
5+
.*.sw[a-z]
6+
*.un~
7+
*.tmp
8+
*.bk
9+
*.bkup
10+
.kitchen.local.yml
11+
Berksfile.lock
712
Gemfile.lock
13+
14+
.bundle/
15+
.cache/
16+
.kitchen/
17+
.vagrant/
18+
.vagrant.d/
19+
bin/
20+
tmp/
21+
vendor/

.kitchen.yml

Lines changed: 29 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -1,55 +1,36 @@
1-
---
21
driver_plugin: vagrant
32
driver_config:
43
require_chef_omnibus: true
54

65
platforms:
7-
- name: ubuntu-12.04
8-
driver_config:
9-
box: opscode-ubuntu-12.04
10-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box
11-
run_list:
12-
- recipe[apt]
13-
14-
- name: ubuntu-10.04
15-
driver_config:
16-
box: opscode-ubuntu-10.04
17-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_provisionerless.box
18-
run_list:
19-
- recipe[apt]
20-
21-
- name: centos-6.4
22-
driver_config:
23-
box: opscode-centos-6.4
24-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-6.4_provisionerless.box
25-
run_list:
26-
- recipe[yum::epel]
27-
28-
- name: centos-5.9
29-
driver_config:
30-
box: opscode-centos-5.9
31-
box_url: https://opscode-vm-bento.s3.amazonaws.com/vagrant/opscode_centos-5.9_provisionerless.box
32-
run_list:
33-
- recipe[yum::epel]
6+
- name: ubuntu-12.04
7+
run_list:
8+
- recipe[apt::default]
9+
- name: ubuntu-10.04
10+
run_list:
11+
- recipe[apt::default]
12+
- name: centos-6.4
13+
run_list:
14+
- recipe[yum::epel]
15+
- name: centos-5.9
16+
run_list:
17+
- recipe[yum::epel]
3418

3519
suites:
36-
- name: client
37-
run_list:
38-
- recipe[mysql::client]
39-
attributes: {}
40-
- name: ruby
41-
run_list:
42-
- recipe[mysql::ruby]
43-
attributes: {}
44-
- name: server
45-
run_list:
46-
- recipe[minitest-handler]
47-
- recipe[mysql_test::server]
48-
attributes: {}
49-
- name: server-nondefault-data
50-
run_list:
51-
- recipe[minitest-handler]
52-
- recipe[mysql_test::server]
53-
attributes:
54-
mysql:
55-
data_dir: "/data/mysql"
20+
- name: client
21+
run_list:
22+
- recipe[mysql::client]
23+
- name: ruby
24+
run_list:
25+
- recipe[mysql::ruby]
26+
- name: server
27+
run_list:
28+
- recipe[minitest-handler]
29+
- recipe[mysql_test::server]
30+
- name: server-nondefault-data
31+
run_list:
32+
- recipe[minitest-handler]
33+
- recipe[mysql_test::server]
34+
attributes:
35+
mysql:
36+
data_dir: "/data/mysql"

.rubocop.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
AllCops:
2+
Excludes:
3+
- vendor/**
4+
5+
AlignParameters:
6+
Enabled: false
7+
Encoding:
8+
Enabled: false
9+
HashSyntax:
10+
Enabled: false
11+
LineLength:
12+
Enabled: false
13+
MethodLength:
14+
Max: 30

.travis.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
rvm:
2+
- 1.9.3
3+
- 2.0.0
4+
script:
5+
- bundle exec foodcritic -f any . --tags ~FC007 --tags ~FC024
6+
# - bundle exec rspec --color --format progress
7+
- bundle exec rubocop

Berksfile

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
site :opscode
2-
32
metadata
43

54
group :integration do
6-
cookbook "apt"
7-
cookbook "yum"
8-
9-
cookbook "mysql_test", :path => "./test/cookbooks/mysql_test"
10-
cookbook "minitest-handler"
5+
cookbook 'apt', '~> 2.0'
6+
cookbook 'minitest-handler'
7+
cookbook 'yum', '~> 2.0'
8+
cookbook 'mysql_test', :path => 'test/cookbooks/mysql_test'
119
end

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ mysql Cookbook CHANGELOG
22
========================
33
This file is used to list changes made in each version of the mysql cookbook.
44

5+
56
v3.0.4
67
------
78
### Bug

CONTRIBUTING

Lines changed: 0 additions & 29 deletions
This file was deleted.

0 commit comments

Comments
 (0)