diff --git a/.gitignore b/.gitignore index c50cd9b..2e5dd04 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,4 @@ spec/fixtures/ .vagrant/ log/ vendor/ +bin/ diff --git a/Gemfile b/Gemfile index a6353b3..50a55bb 100644 --- a/Gemfile +++ b/Gemfile @@ -33,4 +33,5 @@ group :system_tests do gem 'beaker' gem 'beaker-rspec' gem 'vagrant-wrapper' + gem "beaker-puppet_install_helper" end diff --git a/spec/acceptance/class_spec.rb b/spec/acceptance/class_spec.rb index b1dfdaa..d1252da 100644 --- a/spec/acceptance/class_spec.rb +++ b/spec/acceptance/class_spec.rb @@ -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 diff --git a/spec/acceptance/download_folder_spec.rb b/spec/acceptance/download_folder_spec.rb index 4c89e0a..1547d90 100644 --- a/spec/acceptance/download_folder_spec.rb +++ b/spec/acceptance/download_folder_spec.rb @@ -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/ } diff --git a/spec/acceptance/nodesets/docker/ubuntu-14.04.yml b/spec/acceptance/nodesets/docker/ubuntu-14.04.yml new file mode 100644 index 0000000..babb715 --- /dev/null +++ b/spec/acceptance/nodesets/docker/ubuntu-14.04.yml @@ -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 diff --git a/spec/spec_helper_acceptance.rb b/spec/spec_helper_acceptance.rb index bdbc1d6..d5742bd 100644 --- a/spec/spec_helper_acceptance.rb +++ b/spec/spec_helper_acceptance.rb @@ -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']