Skip to content

Commit

Permalink
FIX test acceptance
Browse files Browse the repository at this point in the history
  • Loading branch information
gbloquel committed Sep 25, 2016
1 parent 191211a commit 103f401
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 13 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ spec/fixtures/
.vagrant/
log/
vendor/
bin/
1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -33,4 +33,5 @@ group :system_tests do
gem 'beaker'
gem 'beaker-rspec'
gem 'vagrant-wrapper'
gem "beaker-puppet_install_helper"
end
7 changes: 5 additions & 2 deletions spec/acceptance/class_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,11 @@
end

context 'Nexus should be running on the default port' do
describe command('sleep 30 && echo "Give Nexus time to start"') do
its(:exit_status) { should eq 0 }
describe port(8081) do
it {
sleep(90) # Waiting start up
should be_listening
}
end

describe command('curl 0.0.0.0:8081/nexus/') do
Expand Down
7 changes: 5 additions & 2 deletions spec/acceptance/download_folder_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,11 @@
end

context 'Nexus should be running on the default port' do
describe command('sleep 30 && echo "Give Nexus time to start"') do
its(:exit_status) { should eq 0 }
describe port(8081) do
it {
sleep(90) # Waiting start up
should be_listening
}
end
describe command('curl 0.0.0.0:8081/nexus/') do
its(:stdout) { should match /Sonatype Nexus™ 2.8.0-05/ }
Expand Down
16 changes: 16 additions & 0 deletions spec/acceptance/nodesets/docker/ubuntu-14.04.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
HOSTS:
ubuntu-1404-x64:
roles:
- default
- master
- database
platform: ubuntu-14.04-amd64
hypervisor: docker
image: ubuntu:14.04
docker_preserve_image: true
docker_cmd: '["/sbin/init"]'
docker_image_commands:
# ensure that upstart is booting correctly in the container
- 'rm /usr/sbin/policy-rc.d && rm /sbin/initctl && dpkg-divert --rename --remove /sbin/initctl && apt-get update && apt-get install -y net-tools wget && locale-gen en_US.UTF-8'
CONFIG:
trace_limit: 200
11 changes: 2 additions & 9 deletions spec/spec_helper_acceptance.rb
Original file line number Diff line number Diff line change
@@ -1,16 +1,9 @@
require 'beaker-rspec'
require 'beaker/puppet_install_helper'

# Install Puppet
unless ENV['RS_PROVISION'] == 'no'
# This will install the latest available package on el and deb based
# systems fail on windows and osx, and install via gem on other *nixes
foss_opts = { :default_action => 'gem_install' }

if default.is_pe?; then install_pe; else install_puppet( foss_opts ); end

hosts.each do |host|
on host, "mkdir -p #{host['distmoduledir']}"
end
run_puppet_install_helper
end

UNSUPPORTED_PLATFORMS = ['RedHat','Suse','windows','AIX','Solaris']
Expand Down

0 comments on commit 103f401

Please sign in to comment.