Skip to content

Commit 377ff7d

Browse files
committed
Clean up integration tests, tasks
1 parent e8c2b0b commit 377ff7d

File tree

4 files changed

+5
-48
lines changed

4 files changed

+5
-48
lines changed

.kitchen.docker.yml renamed to .kitchen.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ driver:
55

66
platforms:
77
- name: centos-6
8-
# - name: centos-7
8+
- name: centos-7
99

1010
suites:
1111
- name: docker-integration-test

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ cache: bundler
99
bundler_args: --without development
1010

1111
script:
12-
- export KITCHEN_YAML=.kitchen.docker.yml
12+
- export KITCHEN_YAML=.kitchen.travis.yml
1313
- travis_retry bundle exec rake travis

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Dir.glob(File.join(__dir__, 'tasks', '**', '*.rb'), &method(:require))
1414

1515
#----------------------------------------------------------------------- tasks
1616
desc 'Run all tests on Travis'
17-
task :travis => %w(style spec integration:docker)
17+
task :travis => %w(style spec integration:travis)
1818

1919
# Default
2020
task :default => %w(style spec)

tasks/integration.rb

Lines changed: 2 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@
2222
require 'rake'
2323

2424
#----------------------------------------------------------- integration tests
25-
# # TODO: from sudo cookboook:
2625
# Integration tests. Kitchen.ci
2726
namespace :integration do
2827
begin
@@ -31,10 +30,9 @@
3130
desc 'Run Test Kitchen integration tests with Docker'
3231
task :docker do
3332
Kitchen.logger = Kitchen.default_file_logger
34-
# loader_config = { :project_config => ENV["KITCHEN_YAML"] }
3533
config = {
3634
:loader => Kitchen::Loader::YAML.new(:project_config =>
37-
ENV['KITCHEN_YAML'] || '.kitchen.local.yml')
35+
ENV['KITCHEN_YAML'] || '.kitchen.local.yml')
3836
}
3937
Kitchen::Config.new(config).instances.each do |instance|
4038
instance.test(:always)
@@ -45,7 +43,7 @@
4543
end
4644
end
4745

48-
task :integration => %w(integration:docker)
46+
task :integration => %w(integration:local)
4947

5048
# where
5149
# integration:cloud
@@ -56,44 +54,3 @@
5654
# integration:docker
5755
# integration:vagrant
5856
# integration:parallels
59-
60-
61-
# desc 'Run Test Kitchen integration tests'
62-
# namespace :integration do
63-
# # Gets a collection of instances.
64-
# #
65-
# # @param regexp [String] regular expression to match against instance names.
66-
# # @param config [Hash] configuration values for the `Kitchen::Config` class.
67-
# # @return [Collection<Instance>] all instances.
68-
# def kitchen_instances(regexp, config)
69-
# instances = Kitchen::Config.new(config).instances
70-
# return instances if regexp.nil? || regexp == 'all'
71-
# instances.get_all(Regexp.new(regexp))
72-
# end
73-
#
74-
# # Runs a test kitchen action against some instances.
75-
# #
76-
# # @param action [String] kitchen action to run (defaults to `'test'`).
77-
# # @param regexp [String] regular expression to match against instance names.
78-
# # @param loader_config [Hash] loader configuration options.
79-
# # @return void
80-
# def run_kitchen(action, regexp, loader_config = {})
81-
# action = 'test' if action.nil?
82-
# require 'kitchen'
83-
# Kitchen.logger = Kitchen.default_file_logger
84-
# config = { loader: Kitchen::Loader::YAML.new(loader_config) }
85-
# kitchen_instances(regexp, config).each { |i| i.send(action) }
86-
# end
87-
#
88-
# desc 'Run integration tests with kitchen-vagrant'
89-
# task :vagrant, [:regexp, :action] do |_t, args|
90-
# run_kitchen(args.action, args.regexp)
91-
# end
92-
#
93-
# desc 'Run integration tests with kitchen-docker'
94-
# task :docker, [:regexp, :action] do |_t, args|
95-
# run_kitchen(args.action, args.regexp, local_config: '.kitchen.docker.yml')
96-
# end
97-
# end
98-
#
99-
# task default: %w(integration:vagrant)

0 commit comments

Comments
 (0)