test-kitchen 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +13 -0
- data/README.md +92 -104
- data/lib/kitchen/busser.rb +2 -2
- data/lib/kitchen/cli.rb +1 -1
- data/lib/kitchen/version.rb +1 -1
- data/test-kitchen.gemspec +2 -2
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d22285218684802317ed183046f76c3cc2344292
|
4
|
+
data.tar.gz: ddebfec0f35d3e73146860e4f0c1965b5dcfa606
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dcc1ca63e1da958c70604f2df12fd141004f41339be28d815c593f5e1fa02b97005613dcd720dccc78fc2994ca82ce345b6a9e936efd50264e3883e4a36f87d5
|
7
|
+
data.tar.gz: 530e3634dc4113aa662f95aec7f8e5f49028fdaef173db54b172ff4253c9c8d79973b8b499823d6012d5c8f6307266eb7f7b5582e4180d5b79937fce1953d221
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
## 1.1.0 / 2013-12-04
|
2
|
+
|
3
|
+
### Default updates
|
4
|
+
|
5
|
+
* Set `Busser[:sudo]` to `true` by default (formerly set to `false` by default). ([@fnichol][])
|
6
|
+
|
7
|
+
### Improvements
|
8
|
+
|
9
|
+
* Pull request [#272][]: Drive by typo fix. ([@kisoku][])
|
10
|
+
|
11
|
+
|
1
12
|
## 1.0.0 / 2013-12-01
|
2
13
|
|
3
14
|
### Bug fixes
|
@@ -371,6 +382,7 @@ The initial release.
|
|
371
382
|
[#262]: https://github.com/opscode/test-kitchen/issues/262
|
372
383
|
[#265]: https://github.com/opscode/test-kitchen/issues/265
|
373
384
|
[#266]: https://github.com/opscode/test-kitchen/issues/266
|
385
|
+
[#272]: https://github.com/opscode/test-kitchen/issues/272
|
374
386
|
[@ChrisLundquist]: https://github.com/ChrisLundquist
|
375
387
|
[@adamhjk]: https://github.com/adamhjk
|
376
388
|
[@arangamani]: https://github.com/arangamani
|
@@ -390,6 +402,7 @@ The initial release.
|
|
390
402
|
[@jrwesolo]: https://github.com/jrwesolo
|
391
403
|
[@jtimberman]: https://github.com/jtimberman
|
392
404
|
[@juliandunn]: https://github.com/juliandunn
|
405
|
+
[@kisoku]: https://github.com/kisoku
|
393
406
|
[@manul]: https://github.com/manul
|
394
407
|
[@mattray]: https://github.com/mattray
|
395
408
|
[@mconigliaro]: https://github.com/mconigliaro
|
data/README.md
CHANGED
@@ -1,135 +1,123 @@
|
|
1
1
|
# Test Kitchen
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/test-kitchen.png)](http://badge.fury.io/rb/test-kitchen)
|
3
4
|
[![Build Status](https://secure.travis-ci.org/test-kitchen/test-kitchen.png?branch=master)](https://travis-ci.org/test-kitchen/test-kitchen)
|
4
5
|
[![Code Climate](https://codeclimate.com/github/test-kitchen/test-kitchen.png)](https://codeclimate.com/github/test-kitchen/test-kitchen)
|
6
|
+
[![Dependency Status](https://gemnasium.com/test-kitchen/test-kitchen.png)](https://gemnasium.com/test-kitchen/test-kitchen)
|
5
7
|
|
6
|
-
|
8
|
+
| | |
|
9
|
+
|-------------|-----------------------------------------------|
|
10
|
+
| Website | http://kitchen.ci |
|
11
|
+
| Source Code | http://kitchen.ci/docs/getting-started/ |
|
12
|
+
| IRC | [#kitchenci][irc] channel on Freenode |
|
13
|
+
| Twitter | [@kitchenci][twitter] |
|
7
14
|
|
8
|
-
|
15
|
+
> **Test Kitchen is an integration tool for developing and testing
|
16
|
+
> infrastructure code and software on isolated target platforms.**
|
9
17
|
|
10
|
-
|
11
|
-
-------------
|
18
|
+
## Getting Started Guide
|
12
19
|
|
13
|
-
|
20
|
+
To learn how to install and setup Test Kitchen for developing infrastructure
|
21
|
+
code, check out the [Getting Started Guide][guide].
|
22
|
+
|
23
|
+
If you want to get going super fast, then try the Quick Start next...
|
24
|
+
|
25
|
+
## Quick Start
|
26
|
+
|
27
|
+
Test Kitchen is a RubyGem and can be installed with:
|
14
28
|
|
15
|
-
```text
|
16
|
-
$ gem install test-kitchen --pre
|
17
29
|
```
|
30
|
+
$ gem install test-kitchen
|
31
|
+
```
|
32
|
+
|
33
|
+
If you use Bundler, you can add `gem "test-kitchen"` to your Gemfile and make
|
34
|
+
sure to run `bundle install`.
|
18
35
|
|
19
|
-
|
36
|
+
Next add support to your library, Chef cookbook, or empty project with `kitchen
|
37
|
+
init`:
|
20
38
|
|
21
|
-
```
|
39
|
+
```
|
22
40
|
$ kitchen init
|
23
|
-
create .kitchen.yml
|
24
41
|
```
|
25
|
-
In this guide, we
|
26
|
-
will be using the [kitchen vagrant driver](https://github.com/test-kitchen/kitchen-vagrant),
|
27
|
-
so install that:
|
28
42
|
|
29
|
-
|
30
|
-
|
31
|
-
|
43
|
+
A `.kitchen.yml` will be created in your project base directory. This file
|
44
|
+
describes your testing confiuration; what you want to test and on which target
|
45
|
+
platforms. Each of these suite and platform combinations are called instances.
|
46
|
+
By default your instances will be converged with Chef Solo and run in Vagrant
|
47
|
+
virtual machines.
|
48
|
+
|
49
|
+
Get a listing of your instances with:
|
32
50
|
|
33
|
-
|
34
|
-
|
51
|
+
```
|
52
|
+
$ kitchen list
|
53
|
+
```
|
35
54
|
|
36
|
-
|
37
|
-
your tests in parallel. Trust us, it's faster!
|
55
|
+
Run Chef on an instance, in this case `default-ubuntu-1204`, with:
|
38
56
|
|
39
|
-
|
57
|
+
```
|
58
|
+
$ kitchen converge default-ubuntu-1204
|
59
|
+
```
|
40
60
|
|
41
|
-
|
61
|
+
Destroy all instances with:
|
42
62
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
- `never`: Never clean up builds, even if they pass or fail.
|
47
|
-
- `always`: Regardless of the success or failure of the build,
|
48
|
-
destroy the machine.
|
49
|
-
- `--log-level=debug|info|warn|error|fatal` - Set the log-level of
|
50
|
-
the entire stack, including the chef-solo run.
|
63
|
+
```
|
64
|
+
$ kitchen destroy
|
65
|
+
```
|
51
66
|
|
52
|
-
You can
|
67
|
+
You can clone a Chef cookbook project that contains Test Kitchen support and
|
68
|
+
run through all the instances in serial by running:
|
53
69
|
|
54
|
-
```
|
55
|
-
|
56
|
-
parallel: true
|
57
|
-
destroy: never
|
70
|
+
```
|
71
|
+
$ kitchen test
|
58
72
|
```
|
59
73
|
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
Test-Kitchen reads its configuration from the .kitchen.yml
|
66
|
-
configuration file at the root of your cookbook. It closely resembles
|
67
|
-
the format of .travis.yml which is intentional.
|
68
|
-
|
69
|
-
There are 4 stanzas in .kitchen.yml, driver_plugin, driver_config,
|
70
|
-
platforms, and suites. driver_plugin, platforms, and suites are
|
71
|
-
currently required. driver_config can optionally be used to set values
|
72
|
-
for all platforms defined.
|
73
|
-
|
74
|
-
The driver_plugin stanza is only one line long and defines which
|
75
|
-
driver is used by test-kitchen.
|
76
|
-
|
77
|
-
The platforms stanza defines individual virtual machines. Additional
|
78
|
-
driver_config, node attributes, and run_list can be defined in this stanza
|
79
|
-
|
80
|
-
The suites stanza defines sets of tests that you intend to be run on
|
81
|
-
each platform. A run_list and node attributes can be defined for each
|
82
|
-
suite. The run_list and node attributes will be merged with that of
|
83
|
-
each platform. In case of the conflict, the attributes defined on the
|
84
|
-
suite will triumph.
|
85
|
-
|
86
|
-
```yaml
|
87
|
-
|
88
|
-
---
|
89
|
-
driver_plugin: vagrant
|
90
|
-
|
91
|
-
platforms:
|
92
|
-
- name: ubuntu-12.04
|
93
|
-
driver_config:
|
94
|
-
box: opscode-ubuntu-12.04
|
95
|
-
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-ubuntu-12.04.box
|
96
|
-
|
97
|
-
- name: centos-6.3
|
98
|
-
driver_config:
|
99
|
-
box: opscode-centos-6.3
|
100
|
-
box_url: https://opscode-vm.s3.amazonaws.com/vagrant/boxes/opscode-centos-6.3.box
|
101
|
-
run_list:
|
102
|
-
- recipe[yum::epel]
|
103
|
-
|
104
|
-
suites:
|
105
|
-
- name: stock_system_and_user
|
106
|
-
run_list:
|
107
|
-
- recipe[user::data_bag]
|
108
|
-
- recipe[rvm::system]
|
109
|
-
- recipe[rvm::user]
|
110
|
-
attributes:
|
111
|
-
users:
|
112
|
-
- wigglebottom
|
113
|
-
rvm:
|
114
|
-
user_installs:
|
115
|
-
- user: wigglebottom
|
116
|
-
default_ruby: 1.8.7
|
74
|
+
There is help included with the `kitchen help` subcommand which will list all
|
75
|
+
subcommands and their usage:
|
76
|
+
|
77
|
+
```
|
78
|
+
$ kitchen help test
|
117
79
|
```
|
118
80
|
|
119
|
-
##
|
81
|
+
## Documentation
|
82
|
+
|
83
|
+
Documentation is being added on the Test Kitchen [website][website]. Please
|
84
|
+
read and contribute to improve them!
|
85
|
+
|
86
|
+
## Versioning
|
87
|
+
|
88
|
+
Test Kitchen aims to adhere to [Semantic Versioning 2.0.0][semver].
|
89
|
+
|
90
|
+
## Development
|
91
|
+
|
92
|
+
* Source hosted at [GitHub][repo]
|
93
|
+
* Report issues/questions/feature requests on [GitHub Issues][issues]
|
94
|
+
|
95
|
+
Pull requests are very welcome! Make sure your patches are well tested.
|
96
|
+
Ideally create a topic branch for every separate change you make. For
|
97
|
+
example:
|
98
|
+
|
99
|
+
1. Fork the repo
|
100
|
+
2. Create your feature branch (`git checkout -b my-new-feature`)
|
101
|
+
3. Commit your changes (`git commit -am 'Added some feature'`)
|
102
|
+
4. Push to the branch (`git push origin my-new-feature`)
|
103
|
+
5. Create new Pull Request
|
120
104
|
|
121
|
-
|
105
|
+
## Authors
|
122
106
|
|
123
|
-
|
107
|
+
Created and maintained by [Fletcher Nichol][fnichol] (<fnichol@nichol.ca>) and
|
108
|
+
a growing community of [contributors][contributors].
|
124
109
|
|
125
|
-
|
126
|
-
potential for massive refactorings (that could be API breaking), and minimal
|
127
|
-
to no documentation. This will change as the project transitions to be used in
|
128
|
-
production environments.
|
110
|
+
## License
|
129
111
|
|
130
|
-
|
131
|
-
via freenode/IRC (#chef-hacking),
|
132
|
-
Twitter ([@fnichol](https://twitter.com/fnichol)),
|
133
|
-
or Email ([fnichol@nichol.ca](mailto:fnichol@nichol.ca)).
|
112
|
+
Apache License, Version 2.0 (see [LICENSE][license])
|
134
113
|
|
135
|
-
|
114
|
+
[contributors]: https://github.com/test-kitchen/test-kitchen/graphs/contributors
|
115
|
+
[fnichol]: https://github.com/fnichol
|
116
|
+
[guide]: http://kitchen.ci/docs/getting-started/
|
117
|
+
[irc]: http://webchat.freenode.net/?channels=kitchenci
|
118
|
+
[issues]: https://github.com/test-kitchen/test-kitchen/issues
|
119
|
+
[license]: https://github.com/test-kitchen/test-kitchen/blob/master/LICENSE
|
120
|
+
[repo]: https://github.com/test-kitchen/test-kitchen
|
121
|
+
[semver]: http://semver.org/
|
122
|
+
[twitter]: https://twitter.com/kitchenci
|
123
|
+
[website]: http://kitchen.ci
|
data/lib/kitchen/busser.rb
CHANGED
@@ -37,7 +37,7 @@ module Kitchen
|
|
37
37
|
# @option opts [String] :instance_ruby_bindir path to the directory
|
38
38
|
# containing the Ruby binary on the remote instance
|
39
39
|
# @option opts [TrueClass, FalseClass] :sudo whether or not to invoke
|
40
|
-
# sudo before commands requiring root access (default: `
|
40
|
+
# sudo before commands requiring root access (default: `true`)
|
41
41
|
def initialize(suite_name, opts = {})
|
42
42
|
validate_options(suite_name)
|
43
43
|
|
@@ -48,7 +48,7 @@ module Kitchen
|
|
48
48
|
@config[:kitchen_root] = kitchen_root
|
49
49
|
@config[:test_base_path] = File.expand_path(test_base_path, kitchen_root)
|
50
50
|
@config[:suite_name] = suite_name
|
51
|
-
@config[:sudo] = opts.fetch(:sudo,
|
51
|
+
@config[:sudo] = opts.fetch(:sudo, true)
|
52
52
|
@config[:ruby_bindir] = opts.fetch(:ruby_bindir, DEFAULT_RUBY_BINDIR)
|
53
53
|
@config[:root_path] = opts.fetch(:root_path, DEFAULT_ROOT_PATH)
|
54
54
|
@config[:version] = opts.fetch(:version, "busser")
|
data/lib/kitchen/cli.rb
CHANGED
@@ -68,7 +68,7 @@ module Kitchen
|
|
68
68
|
end
|
69
69
|
end
|
70
70
|
|
71
|
-
desc "
|
71
|
+
desc "diagnose [(all|<REGEX>)]", "Show computed diagnostic configuration"
|
72
72
|
method_option :log_level, :aliases => "-l",
|
73
73
|
:desc => "Set the log level (debug, info, warn, error, fatal)"
|
74
74
|
method_option :loader, :type => :boolean,
|
data/lib/kitchen/version.rb
CHANGED
data/test-kitchen.gemspec
CHANGED
@@ -9,9 +9,9 @@ Gem::Specification.new do |gem|
|
|
9
9
|
gem.license = 'Apache 2.0'
|
10
10
|
gem.authors = ['Fletcher Nichol']
|
11
11
|
gem.email = ['fnichol@nichol.ca']
|
12
|
-
gem.description = %q{
|
12
|
+
gem.description = %q{Test Kitchen is an integration tool for developing and testing infrastructure code and software on isolated target platforms.}
|
13
13
|
gem.summary = gem.description
|
14
|
-
gem.homepage = '
|
14
|
+
gem.homepage = 'http://kitchen.ci'
|
15
15
|
|
16
16
|
gem.files = `git ls-files`.split($/)
|
17
17
|
gem.executables = %w(kitchen)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: test-kitchen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fletcher Nichol
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-12-
|
11
|
+
date: 2013-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mixlib-shellout
|
@@ -248,7 +248,8 @@ dependencies:
|
|
248
248
|
- - ~>
|
249
249
|
- !ruby/object:Gem::Version
|
250
250
|
version: '0.8'
|
251
|
-
description:
|
251
|
+
description: Test Kitchen is an integration tool for developing and testing infrastructure
|
252
|
+
code and software on isolated target platforms.
|
252
253
|
email:
|
253
254
|
- fnichol@nichol.ca
|
254
255
|
executables:
|
@@ -351,7 +352,7 @@ files:
|
|
351
352
|
- templates/driver/version.rb.erb
|
352
353
|
- templates/init/kitchen.yml.erb
|
353
354
|
- test-kitchen.gemspec
|
354
|
-
homepage:
|
355
|
+
homepage: http://kitchen.ci
|
355
356
|
licenses:
|
356
357
|
- Apache 2.0
|
357
358
|
metadata: {}
|
@@ -371,10 +372,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
371
372
|
version: '0'
|
372
373
|
requirements: []
|
373
374
|
rubyforge_project:
|
374
|
-
rubygems_version: 2.0.
|
375
|
+
rubygems_version: 2.0.14
|
375
376
|
signing_key:
|
376
377
|
specification_version: 4
|
377
|
-
summary:
|
378
|
+
summary: Test Kitchen is an integration tool for developing and testing infrastructure
|
379
|
+
code and software on isolated target platforms.
|
378
380
|
test_files:
|
379
381
|
- features/kitchen_command.feature
|
380
382
|
- features/kitchen_driver_create_command.feature
|