test-kitchen 1.5.0.rc.1 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: adede1e7727afe32740d4f4b60452b704f4326ee
4
- data.tar.gz: cfd3c1e7ea3517a9d9bbdc8b3b1e135dd546f26b
3
+ metadata.gz: 08a62137db48122bfe93dc6da4e462fc95941bcf
4
+ data.tar.gz: 72a2c0b1c5ecea3f074386e41316ccd3e6d1e565
5
5
  SHA512:
6
- metadata.gz: 3d3dfad8e69eb236fd38ca05e233245342140823b94cf9d7cea0b56f5ec6bbae1aba59494c728fe768dc29e51fd3ee817e764836751e1187f996f6566385b758
7
- data.tar.gz: 4cb4852bb1977639bbb5068420ba26c170f5594d1e21b12be1dec4c6cd6a464ab7426640324066e7545b768c8865d401d1a5d6969f97fc2cdb200fd064ad6020
6
+ metadata.gz: 40a9ceb94182a02f14007b5396e21d729246e2ab51f45e7cbb934b70a605446a53d83001a73ad0b0b4ae8a742bf6656e540f67e016064546ce817158bb7e488f
7
+ data.tar.gz: f326bbd4cb7f2d454a9fb5f42cef75799641782fda6d681cb1bb44059d49fe1c5304d5325b858ac5594d6cacf1ada040cc7f1d32cfcba799a70d6014176c7d98
@@ -1,21 +1,12 @@
1
1
  language: ruby
2
2
 
3
3
  rvm:
4
- - 2.2.3
5
- - 2.1
4
+ - 2.2.4
5
+ - 2.1.8
6
6
  - 2.0.0
7
7
  - ruby-head
8
8
 
9
- env:
10
- - RUBYGEMS_VERSION=
11
- - RUBYGEMS_VERSION=2.4.5
12
- - RUBYGEMS_VERSION=2.2.2
13
- - RUBYGEMS_VERSION=2.1.11
14
- - RUBYGEMS_VERSION=2.0.14
15
- - RUBYGEMS_VERSION=1.8.29
16
-
17
9
  before_install:
18
- - if [ -n "$RUBYGEMS_VERSION" ]; then gem update --system $RUBYGEMS_VERSION; fi
19
10
  - gem --version
20
11
 
21
12
  bundler_args: --without guard
@@ -24,13 +15,14 @@ sudo: false
24
15
 
25
16
  matrix:
26
17
  include:
27
- - rvm: 2.2
18
+ - rvm: 2.2.4
28
19
  sudo: required
29
20
  dist: trusty
30
21
  # To run the proxy tests we need additional gems than what Test Kitchen normally uses
31
22
  # for testing
32
23
  gemfile: Gemfile.proxy_tests
33
24
  before_install:
25
+ - gem install bundler
34
26
  - sudo apt-get update
35
27
  - sudo apt-get -y install squid3 git curl
36
28
  env:
@@ -51,27 +43,6 @@ matrix:
51
43
  - sudo cat /var/log/squid3/access.log
52
44
  allow_failures:
53
45
  - rvm: ruby-head
54
- exclude:
55
- - rvm: 2.2
56
- env: RUBYGEMS_VERSION=2.2.2
57
- - rvm: 2.2
58
- env: RUBYGEMS_VERSION=2.1.11
59
- - rvm: 2.2
60
- env: RUBYGEMS_VERSION=2.0.14
61
- - rvm: 2.2
62
- env: RUBYGEMS_VERSION=1.8.29
63
- - rvm: 2.1
64
- env: RUBYGEMS_VERSION=1.8.29
65
- - rvm: 2.0.0
66
- env: RUBYGEMS_VERSION=1.8.29
67
- - rvm: ruby-head
68
- env: RUBYGEMS_VERSION=2.2.2
69
- - rvm: ruby-head
70
- env: RUBYGEMS_VERSION=2.1.11
71
- - rvm: ruby-head
72
- env: RUBYGEMS_VERSION=2.0.14
73
- - rvm: ruby-head
74
- env: RUBYGEMS_VERSION=1.8.29
75
46
 
76
47
  notifications:
77
48
  irc: "chat.freenode.net#kitchenci"
@@ -4,24 +4,43 @@
4
4
 
5
5
  ### Bug fixes
6
6
 
7
+ * PR [#499][]: Use single quotes in Rake/Thorfile templates ([@chr4][])
8
+ * PR [#697][]: Set default log level even if you forget to add it to command line arg ([@scotthain][])
7
9
  * PR [#816][]: Fix SuSe OS Busser install ([@Peuserik][])
10
+ * PR [#824][]: Fix handling of chunked ssh output ([@kingpong][])
8
11
  * PR [#833][]: Updates the gem path to install everything in /tmp/verifier ([@scotthain][])
12
+ * PR [#835][]: WinRM connect (with retry) is failing on Windows ([@Stift][])
13
+ * PR [#864][]: Fix Windows Omnibus Install ([@dissonanz][])
9
14
  * PR [#878][]: write install_command to file and invoke on the instance to avoid command too long on windows ([@mwrock][])
15
+ * PR [#897][]: typo: on != no ([@miketheman][])
16
+ * PR [#919][]: Because net/ssh is no longer including timeout.rb, we need to so that Ruby doesn't think Timeout belongs to the TK class ([@tyler-ball][])
10
17
 
11
18
  ### New features
12
19
 
13
20
  * PR [#741][]: Add shell verifier ([@sawanoboly][])
14
21
  * PR [#752][]: Make lazyhash enumerable ([@caboteria][])
22
+ * PR [#827][]: update omnibus url to chef.io ([@andrewelizondo][])
23
+ * PR [#857][]: add cli option to set the test path ([@chris-rock][])
15
24
  * PR [#892][]: Adding proxy tests to the Travis.yml ([@tyler-ball][])
16
25
  * PR [#895][]: Adding in ChefConfig support to enable loading proxy config from chef config files ([@tyler-ball][])
26
+ * PR [#901][]: Add support for --profile-ruby ([@martinb3][])
27
+ * PR [#906][]: Adding Maintainers file ([@cheeseplus][])
17
28
 
18
29
  ### Improvements
19
30
 
31
+ * PR [#753][]: add tests for empty or missing files ([@miketheman][])
32
+ * PR [#776][]: Add more options for WinRM ([@smurawski][])
20
33
  * PR [#782][]: Use [`mixlib-install`](https://github.com/chef/mixlib-install) to generate chef install command. ([@thommay][])
21
34
  * PR [#804][]: Drop Ruby 1.9 from TravisCI build matrix ([@thommay][])
22
35
  * PR [#813][]: Honor proxy ENV variables ([@mcquin][])
36
+ * PR [#825][]: Add hooks for instance cleanup before exit ([@coderanger][])
37
+ * PR [#872][]: Added try/catch around main and set error action to stop ([@mcallb][])
23
38
  * PR [#885][]: Running the chef_base provisioner install_command via sudo, and command_prefix support ([@adamleff][])
24
39
  * PR [#896][]: Fixing garbled output for chef_zero provisioner ([@someara][])
40
+ * PR [#908][]: Updating to the latest release of net-ssh to consume https://github.com/net-ssh/net-ssh/pull/280 ([@tyler-ball][])
41
+ * PR [#911][]: Put Travis on a diet ([@cheeseplus][])
42
+ * PR [#912][]: The netssh 3.0 update returns a different error on connection timeout than 2.9.2 did, adding it to the retry list ([@tyler-ball][])
43
+
25
44
 
26
45
  ## 1.4.2 / 2015-08-03
27
46
 
@@ -742,6 +761,7 @@ The initial release.
742
761
  [#481]: https://github.com/test-kitchen/test-kitchen/issues/481
743
762
  [#489]: https://github.com/test-kitchen/test-kitchen/issues/489
744
763
  [#498]: https://github.com/test-kitchen/test-kitchen/issues/498
764
+ [#499]: https://github.com/test-kitchen/test-kitchen/issues/499
745
765
  [#504]: https://github.com/test-kitchen/test-kitchen/issues/504
746
766
  [#507]: https://github.com/test-kitchen/test-kitchen/issues/507
747
767
  [#510]: https://github.com/test-kitchen/test-kitchen/issues/510
@@ -787,6 +807,7 @@ The initial release.
787
807
  [#675]: https://github.com/test-kitchen/test-kitchen/issues/675
788
808
  [#688]: https://github.com/test-kitchen/test-kitchen/issues/688
789
809
  [#689]: https://github.com/test-kitchen/test-kitchen/issues/689
810
+ [#697]: https://github.com/test-kitchen/test-kitchen/issues/697
790
811
  [#704]: https://github.com/test-kitchen/test-kitchen/issues/704
791
812
  [#711]: https://github.com/test-kitchen/test-kitchen/issues/711
792
813
  [#728]: https://github.com/test-kitchen/test-kitchen/issues/728
@@ -796,25 +817,43 @@ The initial release.
796
817
  [#737]: https://github.com/test-kitchen/test-kitchen/issues/737
797
818
  [#741]: https://github.com/test-kitchen/test-kitchen/issues/741
798
819
  [#752]: https://github.com/test-kitchen/test-kitchen/issues/752
820
+ [#753]: https://github.com/test-kitchen/test-kitchen/issues/753
821
+ [#776]: https://github.com/test-kitchen/test-kitchen/issues/776
799
822
  [#782]: https://github.com/test-kitchen/test-kitchen/issues/782
800
823
  [#801]: https://github.com/test-kitchen/test-kitchen/issues/801
801
824
  [#802]: https://github.com/test-kitchen/test-kitchen/issues/802
802
825
  [#804]: https://github.com/test-kitchen/test-kitchen/issues/804
803
826
  [#813]: https://github.com/test-kitchen/test-kitchen/issues/813
804
827
  [#816]: https://github.com/test-kitchen/test-kitchen/issues/816
828
+ [#824]: https://github.com/test-kitchen/test-kitchen/issues/824
829
+ [#825]: https://github.com/test-kitchen/test-kitchen/issues/825
830
+ [#827]: https://github.com/test-kitchen/test-kitchen/issues/827
805
831
  [#833]: https://github.com/test-kitchen/test-kitchen/issues/833
832
+ [#835]: https://github.com/test-kitchen/test-kitchen/issues/835
833
+ [#857]: https://github.com/test-kitchen/test-kitchen/issues/857
834
+ [#864]: https://github.com/test-kitchen/test-kitchen/issues/864
835
+ [#872]: https://github.com/test-kitchen/test-kitchen/issues/872
806
836
  [#878]: https://github.com/test-kitchen/test-kitchen/issues/878
807
837
  [#885]: https://github.com/test-kitchen/test-kitchen/issues/885
808
838
  [#892]: https://github.com/test-kitchen/test-kitchen/issues/892
809
839
  [#895]: https://github.com/test-kitchen/test-kitchen/issues/895
810
840
  [#896]: https://github.com/test-kitchen/test-kitchen/issues/896
841
+ [#897]: https://github.com/test-kitchen/test-kitchen/issues/897
842
+ [#901]: https://github.com/test-kitchen/test-kitchen/issues/901
843
+ [#906]: https://github.com/test-kitchen/test-kitchen/issues/906
844
+ [#908]: https://github.com/test-kitchen/test-kitchen/issues/908
845
+ [#911]: https://github.com/test-kitchen/test-kitchen/issues/911
846
+ [#912]: https://github.com/test-kitchen/test-kitchen/issues/912
847
+ [#919]: https://github.com/test-kitchen/test-kitchen/issues/919
811
848
  [@Annih]: https://github.com/Annih
812
849
  [@ChrisLundquist]: https://github.com/ChrisLundquist
813
850
  [@MarkGibbons]: https://github.com/MarkGibbons
814
851
  [@Peuserik]: https://github.com/Peuserik
852
+ [@Stift]: https://github.com/Stift
815
853
  [@adamhjk]: https://github.com/adamhjk
816
854
  [@adamleff]: https://github.com/adamleff
817
855
  [@afiune]: https://github.com/afiune
856
+ [@andrewelizondo]: https://github.com/andrewelizondo
818
857
  [@arangamani]: https://github.com/arangamani
819
858
  [@arunthampi]: https://github.com/arunthampi
820
859
  [@benlangfeld]: https://github.com/benlangfeld
@@ -822,10 +861,14 @@ The initial release.
822
861
  [@bryanwb]: https://github.com/bryanwb
823
862
  [@caboteria]: https://github.com/caboteria
824
863
  [@calavera]: https://github.com/calavera
864
+ [@cheeseplus]: https://github.com/cheeseplus
865
+ [@chr4]: https://github.com/chr4
866
+ [@chris-rock]: https://github.com/chris-rock
825
867
  [@chrishenry]: https://github.com/chrishenry
826
868
  [@coderanger]: https://github.com/coderanger
827
869
  [@curiositycasualty]: https://github.com/curiositycasualty
828
870
  [@daniellockard]: https://github.com/daniellockard
871
+ [@dissonanz]: https://github.com/dissonanz
829
872
  [@ekrupnik]: https://github.com/ekrupnik
830
873
  [@fnichol]: https://github.com/fnichol
831
874
  [@fnordfish]: https://github.com/fnordfish
@@ -849,12 +892,14 @@ The initial release.
849
892
  [@juliandunn]: https://github.com/juliandunn
850
893
  [@justincampbell]: https://github.com/justincampbell
851
894
  [@kamalim]: https://github.com/kamalim
895
+ [@kingpong]: https://github.com/kingpong
852
896
  [@kisoku]: https://github.com/kisoku
853
897
  [@lamont-granquist]: https://github.com/lamont-granquist
854
898
  [@lloydde]: https://github.com/lloydde
855
899
  [@manul]: https://github.com/manul
856
900
  [@martinb3]: https://github.com/martinb3
857
901
  [@mattray]: https://github.com/mattray
902
+ [@mcallb]: https://github.com/mcallb
858
903
  [@mconigliaro]: https://github.com/mconigliaro
859
904
  [@mcquin]: https://github.com/mcquin
860
905
  [@metadave]: https://github.com/metadave
@@ -890,4 +935,4 @@ The initial release.
890
935
  [@tyler-ball]: https://github.com/tyler-ball
891
936
  [@whiteley]: https://github.com/whiteley
892
937
  [@zl4bv]: https://github.com/zl4bv
893
- [@zts]: https://github.com/zts
938
+ [@zts]: https://github.com/zts
@@ -0,0 +1,17 @@
1
+ # Release Process
2
+
3
+ This release process applies to all Test Kitchen projects, but each project may have additional requirements.
4
+
5
+ 1. Perform a Github diff between master and the last released version. Determine whether included PRs justify a patch, minor or major version release.
6
+ 2. Check out the master branch of the project being prepared for release.
7
+ 3. Branch into a release-branch of the form `150_release_prep`.
8
+ 4. Modify the `version.rb` file to specify the version for releasing.
9
+ 5. Update the changelog to include what is being released.
10
+ 1. For these projects we use [PimpMyChangelog](https://github.com/pcreux/pimpmychangelog). All this does is make the CHANGELOG look pretty - for now we manually import the PRs / Issues and categorize them.
11
+ 2. Start a [diff](https://github.com/test-kitchen/test-kitchen/compare/v1.4.2...master) in Github between master and the last release
12
+ 3. Look for all the merged PRs and add them to the CHANGELOG.md under the appropriate category. They should have the form `* PR #999: PR Description (@author)`.
13
+ 4. Install and run `pimpmychangelog`. This should change all the PR numbers and @ mentions into links.
14
+ 6. `git commit` the `version.rb` and `CHANGELOG.md` changes to the branch and setup a PR for them. Allow the PR to run any automated tests and review the CHANGELOG for accuracy.
15
+ 7. Merge the PR to master after review.
16
+ 8. Switch your local copy to the master branch and `git pull` to pull in the release preperation changes.
17
+ 9. Run `rake release` on the master branch.
@@ -2,5 +2,4 @@
2
2
  eval_gemfile File.join(File.dirname(__FILE__), "Gemfile")
3
3
 
4
4
  gem "kitchen-ec2"
5
- # TODO when this is released in Chef 12.6.0 we need to depend on that
6
- gem "chef-config", github: "chef/chef", submodules: true
5
+ gem "chef-config"
@@ -0,0 +1,24 @@
1
+ # Maintainers
2
+
3
+ This file lists how the Test Kitchen project is maintained. When making changes
4
+ to the system, this file tells you who needs to review your patch. You need a :+1: vote
5
+ from at least 2 members of the project team listed below. Additionally, you need to not
6
+ receive a veto from the Lieutenant or the Project Lead.
7
+
8
+ ## Project Lead
9
+
10
+ * [Fletcher Nichol](https://github.com/fnichol)
11
+
12
+ ## Lieutenants
13
+ * [Tyler Ball](https://github.com/tyler-ball)
14
+
15
+ ## Maintainers
16
+
17
+ * [Seth Thomas](https://github.com/cheeseplus)
18
+ * [Adam Leff](https://github.com/adamleff)
19
+ * [Jennifer Davis](https://github.com/iennae)
20
+ * [Matt Wrock](https://github.com/mwrock)
21
+ * [Steven Murawski](http://github.com/smurawski)
22
+ * [Chris Hartmann](https://github.com/chris-rock)
23
+ * [Sean Omeara](http://github.com/someara)
24
+ * [Robb Kidd](https://github.com/robbkidd)
@@ -167,10 +167,10 @@ Feature: Add Test Kitchen support to an existing project
167
167
  Then the file "Rakefile" should contain:
168
168
  """
169
169
  begin
170
- require "kitchen/rake_tasks"
170
+ require 'kitchen/rake_tasks'
171
171
  Kitchen::RakeTasks.new
172
172
  rescue LoadError
173
- puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV["CI"]
173
+ puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
174
174
  end
175
175
  """
176
176
 
@@ -186,10 +186,10 @@ Feature: Add Test Kitchen support to an existing project
186
186
  Then the file "Thorfile" should contain:
187
187
  """
188
188
  begin
189
- require "kitchen/thor_tasks"
189
+ require 'kitchen/thor_tasks'
190
190
  Kitchen::ThorTasks.new
191
191
  rescue LoadError
192
- puts ">>>>> Kitchen gem not loaded, omitting tasks" unless ENV["CI"]
192
+ puts '>>>>> Kitchen gem not loaded, omitting tasks' unless ENV['CI']
193
193
  end
194
194
  """
195
195
 
@@ -226,3 +226,49 @@ Feature: Add Test Kitchen support to an existing project
226
226
  attributes:
227
227
 
228
228
  """
229
+
230
+ Scenario: Running init with an empty file metadata.rb sets an empty run list
231
+ Given an empty file named "metadata.rb"
232
+ When I successfully run `kitchen init`
233
+ Then the file ".kitchen.yml" should contain exactly:
234
+ """
235
+ ---
236
+ driver:
237
+ name: vagrant
238
+
239
+ provisioner:
240
+ name: chef_solo
241
+
242
+ platforms:
243
+ - name: ubuntu-14.04
244
+ - name: centos-7.1
245
+
246
+ suites:
247
+ - name: default
248
+ run_list:
249
+ attributes:
250
+
251
+ """
252
+
253
+ Scenario: Running init with no metadata.rb file sets an empty run list
254
+ Given a file named "metadata.rb" does not exist
255
+ When I successfully run `kitchen init`
256
+ Then the file ".kitchen.yml" should contain exactly:
257
+ """
258
+ ---
259
+ driver:
260
+ name: vagrant
261
+
262
+ provisioner:
263
+ name: chef_solo
264
+
265
+ platforms:
266
+ - name: ubuntu-14.04
267
+ - name: centos-7.1
268
+
269
+ suites:
270
+ - name: default
271
+ run_list:
272
+ attributes:
273
+
274
+ """
@@ -93,6 +93,14 @@ module Kitchen
93
93
  :type => :boolean
94
94
  end
95
95
 
96
+ # Sets the test_base_path method_options
97
+ # @api private
98
+ def self.test_base_path
99
+ method_option :test_base_path,
100
+ :aliases => "-t",
101
+ :desc => "Set the base path of the tests"
102
+ end
103
+
96
104
  desc "list [INSTANCE|REGEXP|all]", "Lists one or more instances"
97
105
  method_option :bare,
98
106
  :aliases => "-b",
@@ -165,6 +173,7 @@ module Kitchen
165
173
  [Future DEPRECATION, use --concurrency]
166
174
  Run a #{action} against all matching instances concurrently.
167
175
  DESC
176
+ test_base_path
168
177
  log_options
169
178
  define_method(action) do |*args|
170
179
  update_config!
@@ -210,6 +219,7 @@ module Kitchen
210
219
  :type => :boolean,
211
220
  :default => false,
212
221
  :desc => "Invoke init command if .kitchen.yml is missing"
222
+ test_base_path
213
223
  log_options
214
224
  def test(*args)
215
225
  update_config!
@@ -334,23 +344,51 @@ module Kitchen
334
344
  #
335
345
  # @api private
336
346
  def update_config!
337
- if options[:log_level]
338
- level = options[:log_level].downcase.to_sym
339
- @config.log_level = level
340
- end
347
+ @config.log_level = log_level if log_level
348
+
341
349
  unless options[:log_overwrite].nil?
342
350
  @config.log_overwrite = options[:log_overwrite]
343
351
  end
344
352
 
353
+ if options[:test_base_path]
354
+ # ensure we have an absolute path
355
+ @config.test_base_path = File.absolute_path(options[:test_base_path])
356
+ end
357
+
345
358
  # Now that we have required configs, lets create our file logger
346
359
  Kitchen.logger = Kitchen.default_file_logger(
347
- level,
360
+ log_level,
348
361
  options[:log_overwrite]
349
362
  )
350
363
 
351
364
  update_parallel!
352
365
  end
353
366
 
367
+ # Validate the log level from the config / CLI options, defaulting
368
+ # to :info if the supplied level is empty or invalid
369
+ #
370
+ # @api private
371
+ def log_level
372
+ return unless options[:log_level]
373
+ return @log_level if @log_level
374
+
375
+ level = options[:log_level].downcase.to_sym
376
+ unless valid_log_level?(level)
377
+ level = :info
378
+ banner "WARNING - invalid log level specified: " \
379
+ "\"#{options[:log_level]}\" - reverting to :info log level."
380
+ end
381
+
382
+ @log_level = level
383
+ end
384
+
385
+ # Check to whether a provided log level is valid
386
+ #
387
+ # @api private
388
+ def valid_log_level?(level)
389
+ !Util.to_logger_level(level).nil?
390
+ end
391
+
354
392
  # Set parallel concurrency options for Thor
355
393
  #
356
394
  # @api private
@@ -174,6 +174,7 @@ module Kitchen
174
174
  threads << Thread.new do
175
175
  while instance = queue.pop
176
176
  instance.public_send(action, *args)
177
+ instance.cleanup!
177
178
  end
178
179
  end
179
180
  end
@@ -77,6 +77,10 @@ module Kitchen
77
77
  # @api private
78
78
  attr_accessor :log_overwrite
79
79
 
80
+ # @return [String] an absolute path to the directory containing test suites
81
+ # @api private
82
+ attr_accessor :test_base_path
83
+
80
84
  # Creates a new configuration, representing a particular testing
81
85
  # configuration for a project.
82
86
  #