cleanup old acceptance_spec tests (docker based)

Fixes #5268
This commit is contained in:
Pere Urbon-Bayes 2016-05-10 10:39:42 +02:00
parent 1bb73ca123
commit e31ada89eb
7 changed files with 0 additions and 243 deletions

View file

@ -1,95 +0,0 @@
require_relative '../spec_helper_acceptance'
branch = ENV['LS_BRANCH'] || 'master'
build_url = 'https://s3-eu-west-1.amazonaws.com/build-eu.elasticsearch.org/logstash'
describe "Logstash class:" do
case fact('osfamily')
when 'RedHat'
core_package_name = 'logstash'
service_name = 'logstash'
core_url = "#{build_url}/#{branch}/nightly/JDK7/logstash-latest-SNAPSHOT.rpm"
pid_file = '/var/run/logstash.pid'
when 'Debian'
core_package_name = 'logstash'
service_name = 'logstash'
core_url = "#{build_url}/#{branch}/nightly/JDK7/logstash-latest-SNAPSHOT.deb"
pid_file = '/var/run/logstash.pid'
end
context "Install Nightly core package" do
it 'should run successfully' do
pp = "class { 'logstash': package_url => '#{core_url}', java_install => true }
logstash::configfile { 'basic_config': content => 'input { tcp { port => 2000 } } output { stdout { } } ' }
"
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
sleep 20
expect(apply_manifest(pp, :catch_failures => true).exit_code).to be_zero
end
describe package(core_package_name) do
it { should be_installed }
end
describe service(service_name) do
it { should be_enabled }
it { should be_running }
end
describe file(pid_file) do
it { should be_file }
its(:content) { should match /[0-9]+/ }
end
describe port(2000) do
it {
sleep 30
should be_listening
}
end
end
context "ensure we are still running" do
describe service(service_name) do
it {
sleep 30
should be_running
}
end
describe port(2000) do
it { should be_listening }
end
end
describe "module removal" do
it 'should run successfully' do
pp = "class { 'logstash': ensure => 'absent' }"
# Run it twice and test for idempotency
apply_manifest(pp, :catch_failures => true)
end
describe service(service_name) do
it { should_not be_enabled }
it { should_not be_running }
end
describe package(core_package_name) do
it { should_not be_installed }
end
end
end

View file

@ -1,16 +0,0 @@
HOSTS:
centos-6-x64:
roles:
- master
- database
- dashboard
platform: el-6-x86_64
image: electrical/centos:6.4
hypervisor: docker
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'yum install -y wget ntpdate rubygems ruby-augeas ruby-devel augeas-devel logrotate'
- 'touch /etc/sysconfig/network'
docker_preserve_image: true
CONFIG:
type: foss

View file

@ -1,16 +0,0 @@
HOSTS:
debian-6:
roles:
- master
- database
- dashboard
platform: debian-6-amd64
image: electrical/debian:6.0.8
hypervisor: docker
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -yq lsb-release wget net-tools ruby rubygems ruby1.8-dev libaugeas-dev libaugeas-ruby ntpdate locales-all logrotate'
- 'REALLY_GEM_UPDATE_SYSTEM=1 gem update --system --no-ri --no-rdoc'
docker_preserve_image: true
CONFIG:
type: foss

View file

@ -1,16 +0,0 @@
HOSTS:
debian-7:
roles:
- master
- database
- dashboard
platform: debian-7-amd64
image: electrical/debian:7.3
hypervisor: docker
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -yq lsb-release wget net-tools ruby rubygems ruby1.8-dev libaugeas-dev libaugeas-ruby ntpdate locales-all logrotate'
- 'REALLY_GEM_UPDATE_SYSTEM=1 gem update --system --no-ri --no-rdoc'
docker_preserve_image: true
CONFIG:
type: foss

View file

@ -1,15 +0,0 @@
HOSTS:
ubuntu-12-04:
roles:
- master
- database
- dashboard
platform: ubuntu-12.04-amd64
image: electrical/ubuntu:12.04
hypervisor: docker
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -yq ruby1.8-dev libaugeas-dev libaugeas-ruby ruby rubygems lsb-release wget net-tools curl logrotate'
docker_preserve_image: true
CONFIG:
type: foss

View file

@ -1,15 +0,0 @@
HOSTS:
ubuntu-14-04:
roles:
- master
- database
- dashboard
platform: ubuntu-14.04-amd64
image: electrical/ubuntu:14.04
hypervisor: docker
docker_cmd: '["/sbin/init"]'
docker_image_commands:
- 'apt-get install -yq ruby ruby1.9.1-dev libaugeas-dev libaugeas-ruby lsb-release wget net-tools curl logrotate'
docker_preserve_image: true
CONFIG:
type: foss

View file

@ -1,70 +0,0 @@
require 'beaker-rspec'
require 'pry'
require 'securerandom'
files_dir = ENV['files_dir'] || '/home/jenkins/puppet'
proxy_host = ENV['BEAKER_PACKAGE_PROXY'] || ''
if !proxy_host.empty?
gem_proxy = "http_proxy=#{proxy_host}" unless proxy_host.empty?
hosts.each do |host|
on host, "echo 'export http_proxy='#{proxy_host}'' >> /root/.bashrc"
on host, "echo 'export https_proxy='#{proxy_host}'' >> /root/.bashrc"
on host, "echo 'export no_proxy=\"localhost,127.0.0.1,localaddress,.localdomain.com,#{host.name}\"' >> /root/.bashrc"
end
else
gem_proxy = ''
end
hosts.each do |host|
# Install Puppet
if host.is_pe?
install_pe
else
puppetversion = ENV['VM_PUPPET_VERSION']
on host, "#{gem_proxy} gem install puppet --no-ri --no-rdoc --version '~> #{puppetversion}'"
on host, "mkdir -p #{host['distmoduledir']}"
if fact('osfamily') == 'Suse'
install_package host, 'rubygems ruby-devel augeas-devel libxml2-devel'
on host, "#{gem_proxy} gem install ruby-augeas --no-ri --no-rdoc"
end
end
# on debian/ubuntu nodes ensure we get the latest info
# Can happen we have stalled data in the images
if fact('osfamily') == 'Debian'
on host, "apt-get update"
end
end
RSpec.configure do |c|
# Project root
proj_root = File.expand_path(File.join(File.dirname(__FILE__), '..'))
# Readable test descriptions
c.formatter = :documentation
# Configure all nodes in nodeset
c.before :suite do
# Install module and dependencies
hosts.each do |host|
on host, puppet('module','install','elasticsearch-logstash'), { :acceptable_exit_codes => [0,1] }
if fact('osfamily') == 'Debian'
scp_to(host, "#{files_dir}/puppetlabs-apt-1.4.2.tar.gz", '/tmp/puppetlabs-apt-1.4.2.tar.gz')
on host, puppet('module','install','/tmp/puppetlabs-apt-1.4.2.tar.gz'), { :acceptable_exit_codes => [0,1] }
end
if fact('osfamily') == 'Suse'
on host, puppet('module','install','darin-zypprepo'), { :acceptable_exit_codes => [0,1] }
end
end
end
end