From 8ae56aed710ebe9a59941a4c6b04070f163b8218 Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Wed, 17 Apr 2019 13:29:17 +1000 Subject: [PATCH 1/7] Lint fix for Vagrantfile manifest --- Vagrantfile.d/manifests/site.pp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Vagrantfile.d/manifests/site.pp b/Vagrantfile.d/manifests/site.pp index d2d0eaae..fdf0e1b0 100644 --- a/Vagrantfile.d/manifests/site.pp +++ b/Vagrantfile.d/manifests/site.pp @@ -32,5 +32,5 @@ } logstash::plugin { 'logstash-input-mysql': - environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'] + environment => ['LS_JAVA_OPTS=-Xms1g -Xmx1g'], } From ad02fc0d064b694be84f77515a18138fa1ba4da2 Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Wed, 17 Apr 2019 14:00:09 +1000 Subject: [PATCH 2/7] Do not test Puppet < 4.10.0 --- .travis.yml | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 4dea8ed4..49e3c29f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,9 +37,6 @@ env: - TRAVIS_LINT=true # Run the puppet-rspec synthetic/unit tests. - - PUPPET_VERSION=4.6.2 TRAVIS_UNIT=true - - PUPPET_VERSION=4.8.2 TRAVIS_UNIT=true - - PUPPET_VERSION=4.9.4 TRAVIS_UNIT=true - PUPPET_VERSION=4.10.8 TRAVIS_UNIT=true - PUPPET_VERSION=5.0.1 TRAVIS_UNIT=true - PUPPET_VERSION=5.1.0 TRAVIS_UNIT=true @@ -47,14 +44,6 @@ env: - PUPPET_VERSION=5.3.3 TRAVIS_UNIT=true # Then run the acceptance tests across the matrix. - - PUPPET_VERSION=4.6.2 BEAKER_set=centos-6 - - PUPPET_VERSION=4.8.2 BEAKER_set=centos-6 - - PUPPET_VERSION=4.8.2 BEAKER_set=centos-6 LOGSTASH_VERSION=5.6.4 - - - PUPPET_VERSION=4.6.2 BEAKER_set=centos-7 - - PUPPET_VERSION=4.7.0 BEAKER_set=centos-7 - - PUPPET_VERSION=4.8.2 BEAKER_set=centos-7 - - PUPPET_VERSION=4.9.4 BEAKER_set=centos-7 - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 @@ -72,18 +61,12 @@ env: - PUPPET_VERSION=5.3.3 BEAKER_set=debian-8 - PUPPET_VERSION=5.3.3 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=4.6.2 BEAKER_set=ubuntu-1404 - - PUPPET_VERSION=4.8.2 BEAKER_set=ubuntu-1404 - - PUPPET_VERSION=4.9.4 BEAKER_set=ubuntu-1404 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404 - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=4.6.2 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=4.8.2 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=4.9.4 BEAKER_set=ubuntu-1604 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 From 03337ac9b7614bfe7985df2591e0f35c3707f34f Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Wed, 17 Apr 2019 15:38:52 +1000 Subject: [PATCH 3/7] Do not test Debian 7 --- .travis.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 49e3c29f..7d9a9da4 100644 --- a/.travis.yml +++ b/.travis.yml @@ -50,8 +50,6 @@ env: - PUPPET_VERSION=5.3.3 BEAKER_set=centos-7 - PUPPET_VERSION=5.3.3 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=4.8.2 BEAKER_set=debian-7 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=4.6.2 BEAKER_set=debian-8 - PUPPET_VERSION=4.8.2 BEAKER_set=debian-8 - PUPPET_VERSION=4.9.4 BEAKER_set=debian-8 From 6a1da052539168205b374e75f131093708664b0d Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Wed, 17 Apr 2019 15:43:08 +1000 Subject: [PATCH 4/7] Do not test old Puppet 5 versions --- .travis.yml | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/.travis.yml b/.travis.yml index 7d9a9da4..94e98fda 100644 --- a/.travis.yml +++ b/.travis.yml @@ -38,38 +38,29 @@ env: # Run the puppet-rspec synthetic/unit tests. - PUPPET_VERSION=4.10.8 TRAVIS_UNIT=true - - PUPPET_VERSION=5.0.1 TRAVIS_UNIT=true - - PUPPET_VERSION=5.1.0 TRAVIS_UNIT=true - - PUPPET_VERSION=5.2.0 TRAVIS_UNIT=true - - PUPPET_VERSION=5.3.3 TRAVIS_UNIT=true + - PUPPET_VERSION=5.5.10 TRAVIS_UNIT=true # Then run the acceptance tests across the matrix. - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=5.3.3 BEAKER_set=centos-7 - - PUPPET_VERSION=5.3.3 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=5.5.10 BEAKER_set=centos-7 + - PUPPET_VERSION=5.5.10 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=4.6.2 BEAKER_set=debian-8 - - PUPPET_VERSION=4.8.2 BEAKER_set=debian-8 - - PUPPET_VERSION=4.9.4 BEAKER_set=debian-8 - PUPPET_VERSION=4.10.8 BEAKER_set=debian-8 - PUPPET_VERSION=4.10.8 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=5.3.3 BEAKER_set=debian-8 - - PUPPET_VERSION=5.3.3 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=5.5.10 BEAKER_set=debian-8 + - PUPPET_VERSION=5.5.10 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404 - - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1404 + - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 - - PUPPET_VERSION=5.0.1 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=5.1.0 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=5.2.0 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=5.3.3 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1604 + - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 From ca6f47914131fc8d7c67991132cccef198ba8584 Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Wed, 17 Apr 2019 15:44:25 +1000 Subject: [PATCH 5/7] Test Logstash 6.7.1 --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 94e98fda..915bdf36 100644 --- a/.travis.yml +++ b/.travis.yml @@ -29,7 +29,7 @@ script: env: global: - - LOGSTASH_VERSION=6.1.3 + - LOGSTASH_VERSION=6.7.1 - BEAKER_PE_DIR=spec/fixtures/artifacts - CI_SPEC_OPTIONS='--format documentation' matrix: From 934e09132e4f3ea387e988bdc3faea65328eb8ba Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Tue, 13 Aug 2019 12:15:24 +1000 Subject: [PATCH 6/7] Update tests --- .travis.yml | 49 ++++++++++--------- Gemfile | 4 +- metadata.json | 4 +- spec/acceptance/class_plugin_spec.rb | 9 ---- spec/acceptance/nodesets/centos-6-docker.yml | 17 ------- spec/acceptance/nodesets/centos-6-vagrant.yml | 8 --- spec/acceptance/nodesets/centos-6.yml | 1 - spec/acceptance/nodesets/debian-7-docker.yml | 33 ------------- spec/acceptance/nodesets/debian-7-vagrant.yml | 9 ---- spec/acceptance/nodesets/debian-7.yml | 1 - .../nodesets/ubuntu-1204-docker.yml | 31 ------------ spec/acceptance/nodesets/ubuntu-1204.yml | 1 - .../nodesets/ubuntu-1404-docker.yml | 10 ++-- spec/acceptance/nodesets/ubuntu-1604.yml | 10 +--- 14 files changed, 35 insertions(+), 152 deletions(-) delete mode 100644 spec/acceptance/nodesets/centos-6-docker.yml delete mode 100644 spec/acceptance/nodesets/centos-6-vagrant.yml delete mode 120000 spec/acceptance/nodesets/centos-6.yml delete mode 100644 spec/acceptance/nodesets/debian-7-docker.yml delete mode 100644 spec/acceptance/nodesets/debian-7-vagrant.yml delete mode 120000 spec/acceptance/nodesets/debian-7.yml delete mode 100644 spec/acceptance/nodesets/ubuntu-1204-docker.yml delete mode 120000 spec/acceptance/nodesets/ubuntu-1204.yml diff --git a/.travis.yml b/.travis.yml index 915bdf36..a42d05c3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,7 +12,7 @@ services: language: ruby rvm: - - 2.3.4 + - 2.4.1 script: - docker run --privileged -d polarbearlabs/haveged:1.9.1 # https://github.com/elastic/logstash/issues/5507 @@ -29,7 +29,7 @@ script: env: global: - - LOGSTASH_VERSION=6.7.1 + - LOGSTASH_VERSION=7.3.0 - BEAKER_PE_DIR=spec/fixtures/artifacts - CI_SPEC_OPTIONS='--format documentation' matrix: @@ -37,30 +37,33 @@ env: - TRAVIS_LINT=true # Run the puppet-rspec synthetic/unit tests. - - PUPPET_VERSION=4.10.8 TRAVIS_UNIT=true - - PUPPET_VERSION=5.5.10 TRAVIS_UNIT=true + - PUPPET_VERSION=4.10.12 TRAVIS_UNIT=true + - PUPPET_VERSION=5.5.16 TRAVIS_UNIT=true + - PUPPET_VERSION=6.0.10 TRAVIS_UNIT=true # Then run the acceptance tests across the matrix. - - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 - - PUPPET_VERSION=4.10.8 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=4.10.12 BEAKER_set=centos-7 + - PUPPET_VERSION=4.10.12 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=5.5.16 BEAKER_set=centos-7 + - PUPPET_VERSION=5.5.16 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=6.0.10 BEAKER_set=centos-7 + - PUPPET_VERSION=6.0.10 BEAKER_set=centos-7 LOGSTASH_VERSION=6.8.2 - - PUPPET_VERSION=5.5.10 BEAKER_set=centos-7 - - PUPPET_VERSION=5.5.10 BEAKER_set=centos-7 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=4.10.12 BEAKER_set=debian-8 + - PUPPET_VERSION=4.10.12 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=5.5.16 BEAKER_set=debian-8 + - PUPPET_VERSION=5.5.16 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=6.0.10 BEAKER_set=debian-8 + - PUPPET_VERSION=6.0.10 BEAKER_set=debian-8 LOGSTASH_VERSION=6.8.2 - - PUPPET_VERSION=4.10.8 BEAKER_set=debian-8 - - PUPPET_VERSION=4.10.8 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 + # Logstash 7 and Puppet 6 are not supported on 14.04 (which is EOL). + - PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=6.8.2 - - PUPPET_VERSION=5.5.10 BEAKER_set=debian-8 - - PUPPET_VERSION=5.5.10 BEAKER_set=debian-8 LOGSTASH_VERSION=5.6.4 + - PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1604 + - PUPPET_VERSION=4.10.12 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604 + - PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2 + - PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 + - PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2 - - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 - - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - - - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1404 - - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1404 LOGSTASH_VERSION=5.6.4 - - - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=4.10.8 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 - - - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1604 - - PUPPET_VERSION=5.5.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=5.6.4 diff --git a/Gemfile b/Gemfile index 22af19d7..8cbe3d54 100644 --- a/Gemfile +++ b/Gemfile @@ -1,7 +1,7 @@ source 'https://rubygems.org' -ruby '2.3.4' +ruby '2.4.1' -puppetversion = ENV['PUPPET_VERSION'] || '4.10.7' +puppetversion = ENV['PUPPET_VERSION'] || '6.0.10' gem 'puppet', puppetversion, :require => false gem 'beaker', '3.15.0' diff --git a/metadata.json b/metadata.json index 693c9257..59ba3817 100644 --- a/metadata.json +++ b/metadata.json @@ -1,6 +1,6 @@ { "name": "elastic-logstash", - "version": "6.1.5", + "version": "7.0.0", "source": "https://github.com/elastic/puppet-logstash", "author": "elastic", "license": "Apache-2.0", @@ -14,7 +14,7 @@ }, { "name": "elastic/elastic_stack", - "version_requirement": ">=6.0.0 <7.0.0" + "version_requirement": ">=7.0.0 <8.0.0" } ], "operatingsystem_support": [ diff --git a/spec/acceptance/class_plugin_spec.rb b/spec/acceptance/class_plugin_spec.rb index b9fdd2f3..5fa2aaaa 100644 --- a/spec/acceptance/class_plugin_spec.rb +++ b/spec/acceptance/class_plugin_spec.rb @@ -57,15 +57,6 @@ def remove(plugin) end end - if Gem::Version.new(LS_VERSION) >= Gem::Version.new('5.2.0') - it 'can install x-pack from an https url' do - plugin = 'x-pack' - source = "https://artifacts.elastic.co/downloads/packs/x-pack/x-pack-#{LS_VERSION}.zip" - ensure_plugin('present', plugin, "source => '#{source}'") - expect(installed_plugins).to contain(plugin) - end - end - it 'can install a plugin from a "puppet://" url' do plugin = 'logstash-output-cowthink' source = "puppet:///modules/logstash/#{plugin}-5.0.0.gem" diff --git a/spec/acceptance/nodesets/centos-6-docker.yml b/spec/acceptance/nodesets/centos-6-docker.yml deleted file mode 100644 index 27c8a17b..00000000 --- a/spec/acceptance/nodesets/centos-6-docker.yml +++ /dev/null @@ -1,17 +0,0 @@ -HOSTS: - centos-6-x64: - roles: [agent, database, dashboard, master] - platform: el-6-x86_64 - image: library/centos:6 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - - rm /etc/init/tty.conf - - yum install -y wget ntpdate redhat-lsb-core redhat-lsb rubygems ruby-augeas ruby-devel augeas-devel logrotate - - touch /etc/sysconfig/network - - 'cd / && wget -q --no-cookies --no-check-certificate --header "Cookie: gpw_e24=http%3A%2F%2Fwww.oracle.com%2F; oraclelicense=accept-securebackup-cookie" "http://download.oracle.com/otn-pub/java/jdk/8u131-b11/d54c1d3a095b4ff2b6607d096fa80163/jre-8u131-linux-x64.rpm"' - - 'cd / && yum localinstall -y jre-8u131-linux-x64.rpm' - docker_preserve_image: true -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/centos-6-vagrant.yml b/spec/acceptance/nodesets/centos-6-vagrant.yml deleted file mode 100644 index 45646cdb..00000000 --- a/spec/acceptance/nodesets/centos-6-vagrant.yml +++ /dev/null @@ -1,8 +0,0 @@ -HOSTS: - centos-6-x64: - platform: el-6-x86_64 - box: puppetlabs/centos-6.6-64-nocm - hypervisor: vagrant -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/centos-6.yml b/spec/acceptance/nodesets/centos-6.yml deleted file mode 120000 index 2aced8ba..00000000 --- a/spec/acceptance/nodesets/centos-6.yml +++ /dev/null @@ -1 +0,0 @@ -centos-6-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/debian-7-docker.yml b/spec/acceptance/nodesets/debian-7-docker.yml deleted file mode 100644 index 727c1284..00000000 --- a/spec/acceptance/nodesets/debian-7-docker.yml +++ /dev/null @@ -1,33 +0,0 @@ -HOSTS: - debian-7: - roles: [agent, database, dashboard, master] - platform: debian-7-amd64 - image: debian:7 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - # The base image contains a stub shell script in place of '/sbin/initctl' which - # confuses the heck out of Pleaserun when installing Logstash. - # REF: https://github.com/jordansissel/pleaserun/blob/master/lib/pleaserun/detector.rb - - rm /sbin/initctl - - - apt-get update - - apt-get -y upgrade - - apt-get install -yq apt-transport-https lsb-release wget net-tools ruby rubygems ruby1.8-dev libaugeas-dev libaugeas-ruby ntpdate locales-all logrotate procps - - # Install Oracle Java 8 - - echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee /etc/apt/sources.list.d/webupd8team-java.list - - echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu xenial main" | tee -a /etc/apt/sources.list.d/webupd8team-java.list - - apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 - - apt-get -y update - - echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections - - echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections - - apt-get install -yq oracle-java8-installer - - apt-get install -yq oracle-java8-set-default - - - REALLY_GEM_UPDATE_SYSTEM=1 gem update --system --no-ri --no-rdoc - docker_preserve_image: true - -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/debian-7-vagrant.yml b/spec/acceptance/nodesets/debian-7-vagrant.yml deleted file mode 100644 index 3af37c1b..00000000 --- a/spec/acceptance/nodesets/debian-7-vagrant.yml +++ /dev/null @@ -1,9 +0,0 @@ -HOSTS: - debian-7: - roles: [agent, database, dashboard, master] - platform: debian-7-amd64 - box: puppetlabs/debian-7.8-64-nocm - hypervisor: vagrant -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/debian-7.yml b/spec/acceptance/nodesets/debian-7.yml deleted file mode 120000 index 098c1b6a..00000000 --- a/spec/acceptance/nodesets/debian-7.yml +++ /dev/null @@ -1 +0,0 @@ -debian-7-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/ubuntu-1204-docker.yml b/spec/acceptance/nodesets/ubuntu-1204-docker.yml deleted file mode 100644 index 1cda899b..00000000 --- a/spec/acceptance/nodesets/ubuntu-1204-docker.yml +++ /dev/null @@ -1,31 +0,0 @@ -HOSTS: - ubuntu-12-04: - roles: - - master - - database - - dashboard - platform: ubuntu-12.04-amd64 - image: library/ubuntu:12.04 - hypervisor: docker - docker_cmd: '["/sbin/init"]' - docker_image_commands: - # The base image disables Upstart, which is the "right thing" to do for - # containers. However, we actually want Upstart, because we are trying - # to simulate a full system. Thus, we undo the magic from upstream's - # Dockerfile. - # REF: https://github.com/tianon/docker-brew-ubuntu-core/blob/aec74cf404240664b289d28948d9284a4afd1181/precise/Dockerfile#L14 - - rm /sbin/initctl - - dpkg-divert --rename --remove /sbin/initctl - - - apt-get install -yq apt-transport-https ruby1.8-dev libaugeas-dev libaugeas-ruby ruby rubygems lsb-release wget net-tools curl python-software-properties - - # Install Oracle Java 8 - - echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections - - echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections - - apt-add-repository ppa:webupd8team/java - - apt-get update - - apt-get install -yq oracle-java8-installer - docker_preserve_image: true -CONFIG: - type: foss - :trace_limit: 100 # Get more than 10 lines of trace when something fails. diff --git a/spec/acceptance/nodesets/ubuntu-1204.yml b/spec/acceptance/nodesets/ubuntu-1204.yml deleted file mode 120000 index 6489cd84..00000000 --- a/spec/acceptance/nodesets/ubuntu-1204.yml +++ /dev/null @@ -1 +0,0 @@ -ubuntu-1204-docker.yml \ No newline at end of file diff --git a/spec/acceptance/nodesets/ubuntu-1404-docker.yml b/spec/acceptance/nodesets/ubuntu-1404-docker.yml index 63e6c7b1..36ca4caa 100644 --- a/spec/acceptance/nodesets/ubuntu-1404-docker.yml +++ b/spec/acceptance/nodesets/ubuntu-1404-docker.yml @@ -11,14 +11,10 @@ HOSTS: docker_image_commands: - apt-get update - apt-get install -yq apt-transport-https ruby ruby1.9.1-dev libaugeas-dev libaugeas-ruby lsb-release wget net-tools curl software-properties-common - - # Install Oracle Java 8 - - echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections - - echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections - - apt-add-repository ppa:webupd8team/java + - add-apt-repository ppa:openjdk-r/ppa - apt-get update - - apt-get install -yq oracle-java8-installer - - apt-get install -yq oracle-java8-set-default + - apt-get install -yq openjdk-8-jdk-headless + docker_preserve_image: true CONFIG: diff --git a/spec/acceptance/nodesets/ubuntu-1604.yml b/spec/acceptance/nodesets/ubuntu-1604.yml index 54896dbb..7622a453 100644 --- a/spec/acceptance/nodesets/ubuntu-1604.yml +++ b/spec/acceptance/nodesets/ubuntu-1604.yml @@ -11,15 +11,9 @@ HOSTS: docker_image_commands: - apt-get update - apt-get install -yq apt-transport-https ruby-dev libaugeas-dev ruby rubygems lsb-release wget net-tools curl software-properties-common - - # Install Oracle Java 8 - - echo 'debconf shared/accepted-oracle-license-v1-1 select true' | debconf-set-selections - - echo 'debconf shared/accepted-oracle-license-v1-1 seen true' | debconf-set-selections - - apt-add-repository ppa:webupd8team/java - - apt-get update - - apt-get install -yq oracle-java8-installer - - apt-get install -yq oracle-java8-set-default + - apt-get install -yq openjdk-8-jdk-headless docker_preserve_image: true CONFIG: type: foss :trace_limit: 100 # Get more than 10 lines of trace when something fails. +it st From 195547090964ac2d2483ab0706c240fb8490c04a Mon Sep 17 00:00:00 2001 From: Toby McLaughlin Date: Mon, 26 Aug 2019 15:13:35 +1000 Subject: [PATCH 7/7] Support LS 7 in tests --- .travis.yml | 1 - manifests/plugin.pp | 4 ++-- spec/acceptance/class_plugin_spec.rb | 11 ++++++----- spec/acceptance/nodesets/ubuntu-1604.yml | 1 - 4 files changed, 8 insertions(+), 9 deletions(-) diff --git a/.travis.yml b/.travis.yml index a42d05c3..8b275be0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -66,4 +66,3 @@ env: - PUPPET_VERSION=5.5.16 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2 - PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 - PUPPET_VERSION=6.0.10 BEAKER_set=ubuntu-1604 LOGSTASH_VERSION=6.8.2 - diff --git a/manifests/plugin.pp b/manifests/plugin.pp index 23799b66..41049f2c 100644 --- a/manifests/plugin.pp +++ b/manifests/plugin.pp @@ -48,7 +48,7 @@ Exec { path => '/bin:/usr/bin', - cwd => '/tmp', + cwd => $logstash::home_dir, user => $logstash::logstash_user, timeout => 1800, environment => $environment, @@ -116,7 +116,7 @@ 'absent': { exec { "remove-${name}": command => "${exe} remove ${name}", - onlyif => "${exe} list | grep -q ^${name}$", + onlyif => "${exe} list --installed | grep -q ^${name}$", } } diff --git a/spec/acceptance/class_plugin_spec.rb b/spec/acceptance/class_plugin_spec.rb index 5fa2aaaa..264e0004 100644 --- a/spec/acceptance/class_plugin_spec.rb +++ b/spec/acceptance/class_plugin_spec.rb @@ -26,18 +26,19 @@ def remove(plugin) end context 'when a plugin is not installed' do + plugin = "logstash-output-riemann" before(:each) do - remove('logstash-input-sqs') + remove(plugin) end it 'will not remove it again' do - log = ensure_plugin('absent', 'logstash-input-sqs').stdout - expect(log).to_not contain('remove-logstash-input-sqs') + log = ensure_plugin('absent', plugin).stdout + expect(log).to_not contain("remove-#{plugin}") end it 'can install it from rubygems' do - ensure_plugin('present', 'logstash-input-sqs') - expect(installed_plugins).to contain('logstash-input-sqs') + ensure_plugin('present', plugin) + expect(installed_plugins).to contain(plugin) end end diff --git a/spec/acceptance/nodesets/ubuntu-1604.yml b/spec/acceptance/nodesets/ubuntu-1604.yml index 7622a453..8082f54c 100644 --- a/spec/acceptance/nodesets/ubuntu-1604.yml +++ b/spec/acceptance/nodesets/ubuntu-1604.yml @@ -16,4 +16,3 @@ HOSTS: CONFIG: type: foss :trace_limit: 100 # Get more than 10 lines of trace when something fails. -it st