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

Be a bit louder when skipping an entire integration suite #864

Merged
merged 1 commit into from Aug 4, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 8 additions & 1 deletion test/integration/default/_debug_spec.rb
@@ -1 +1,8 @@
p "You are currently running on OS: #{os[:name] || 'unknown'}, OS release: #{os[:release] || 'unknown'}, OS family: #{os[:family] || 'unknown'}"
puts "-----------------------------------"
puts " TEST ENVIRONMENT "
puts "-----------------------------------"
puts " Docker: #{!ENV['DOCKER'].nil?}"
puts " OS name: #{os[:name] || 'unknown' }"
puts "OS release: #{os[:release] || 'unknown'}"
puts " OS family: #{os[:family] || 'unknown'}"
puts "-----------------------------------"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cool improvement!

11 changes: 8 additions & 3 deletions test/integration/default/apache_conf_spec.rb
@@ -1,8 +1,13 @@
# encoding: utf-8
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
return unless os.linux?
if !os.linux?
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__} because we are not on linux.\033[0m"
return
end

# direct access to params of apache conf
describe apache_conf do
Expand Down
6 changes: 4 additions & 2 deletions test/integration/default/etc_group_spec.rb
@@ -1,7 +1,9 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# lets define our own group
root_group = 'root'
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/file_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

if os[:family] == 'freebsd'
filedata = {
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/iptables_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

case os[:family]
when 'ubuntu', 'fedora'
Expand Down
11 changes: 8 additions & 3 deletions test/integration/default/kernel_module_spec.rb
@@ -1,8 +1,13 @@
# encoding: utf-8
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
return unless os.linux?
if !os.linux?
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__} because we are not on linux.\033[0m"
return
end

# Test kernel modules on all linux systems
describe kernel_module('video') do
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/kernel_parameter_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# prepare values
if ['ubuntu', 'centos', 'fedora', 'opensuse', 'debian'].include?(os[:family])
Expand Down
11 changes: 8 additions & 3 deletions test/integration/default/mount_spec.rb
@@ -1,8 +1,13 @@
# encoding: utf-8
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
return unless os.linux?
if !os.linux?
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__} because we are not on linux.\033[0m"
return
end

# instead of `.with` or `.only_with` we recommend to use the `mount` resource
describe mount '/mnt/iso-disk' do
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/port_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# check that ssh runs
if os.unix?
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/postgres_session_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# postgres-server is installed on these platforms
if ['ubuntu', 'centos'].include? os['family']
Expand Down
7 changes: 4 additions & 3 deletions test/integration/default/service_spec.rb
@@ -1,7 +1,8 @@
# encoding: utf-8

# TODO: do not run those tests on docker yet
return if ENV['DOCKER']
if ENV['DOCKER']
STDERR.puts "\033[1;33mTODO: Not running #{__FILE__.split("/").last} because we are running in docker\033[0m"
return
end

# based on operating system we select the available service
if ['centos', 'fedora', 'freebsd', 'opensuse'].include?(os[:family])
Expand Down