summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Smith <tsmith@chef.io>2019-12-02 10:33:45 -0800
committerGitHub <noreply@github.com>2019-12-02 10:33:45 -0800
commit7a2943c50d75360c58d057db649a5cda92e84447 (patch)
tree1524304b000c1d677d0ac27c3910358526058cd2
parent39fc6f9dd7a7531613e3bbc705dade0715ebfe79 (diff)
parent71fe7e7d3759862d3067f19bdc9d60be29a94287 (diff)
downloadchef-7a2943c50d75360c58d057db649a5cda92e84447.tar.gz
Merge pull request #9127 from chef/testing
Pull in testing updates from master branch
-rw-r--r--.expeditor/verify.pipeline.yml230
-rw-r--r--kitchen-tests/Berksfile1
-rw-r--r--kitchen-tests/cookbooks/end_to_end/Berksfile3
-rw-r--r--kitchen-tests/cookbooks/end_to_end/metadata.rb2
-rw-r--r--kitchen-tests/cookbooks/rspec/metadata.rb8
-rw-r--r--kitchen-tests/cookbooks/rspec/recipes/default.rb13
-rw-r--r--kitchen-tests/cookbooks/rspec/templates/run-chef-rspec11
-rw-r--r--kitchen-tests/kitchen.yml23
-rw-r--r--omnibus/kitchen.yml9
-rw-r--r--omnibus/omnibus-test.sh3
-rwxr-xr-xscripts/bk_tests/bk_install.sh9
-rwxr-xr-xscripts/bk_tests/bk_linux_exec.sh6
-rwxr-xr-xscripts/bk_tests/bk_win_functional.ps18
13 files changed, 124 insertions, 202 deletions
diff --git a/.expeditor/verify.pipeline.yml b/.expeditor/verify.pipeline.yml
index 9a5b654699..83f8cbb6e1 100644
--- a/.expeditor/verify.pipeline.yml
+++ b/.expeditor/verify.pipeline.yml
@@ -16,35 +16,35 @@ steps:
# Tests Ruby 2.6
#########################################################################
-# - label: "Integration Specs Ubuntu :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
-# - bundle exec rake spec:integration
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/ubuntu-18.04
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
-# - BUNDLE_GEMFILE=/workdir/Gemfile
-
-# - label: "Functional Specs Ubuntu :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - apt-get install -y cron locales # needed for functional tests to pass
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
-# - bundle exec rake spec:functional
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/ubuntu-18.04
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
+- label: "Integration Specs Ubuntu :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/ubuntu-18.04
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
+
+- label: "Functional Specs Ubuntu :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - apt-get install -y cron locales # needed for functional tests to pass
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:functional
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/ubuntu-18.04
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
- label: "Unit Specs Ubuntu :ruby: 2.6"
commands:
@@ -60,20 +60,20 @@ steps:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
-# - label: "Integration Specs CentOS :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
-# - bundle exec rake spec:integration
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/centos-7
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
-# - BUNDLE_GEMFILE=/workdir/Gemfile
+- label: "Integration Specs CentOS :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/centos-7
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
- label: "Functional Specs CentOS :ruby: 2.6"
commands:
@@ -104,20 +104,20 @@ steps:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
-# - label: "Integration Specs openSUSE :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
-# - bundle exec rake spec:integration
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/opensuse-15
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
-# - BUNDLE_GEMFILE=/workdir/Gemfile
+- label: "Integration Specs openSUSE :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/opensuse-15
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
- label: "Functional Specs openSUSE :ruby: 2.6"
commands:
@@ -148,35 +148,35 @@ steps:
- FORCE_FFI_YAJL=ext
- CHEF_LICENSE=accept-no-persist
-# - label: "Integration Specs Fedora :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
-# - bundle exec rake spec:integration
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/fedora-latest
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
-# - BUNDLE_GEMFILE=/workdir/Gemfile
-
-# - label: "Functional Specs Fedora :ruby: 2.6"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - yum install -y crontabs e2fsprogs util-linux
-# - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
-# - bundle exec rake spec:functional
-# expeditor:
-# executor:
-# docker:
-# image: rubydistros/fedora-latest
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
+- label: "Integration Specs Fedora :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/fedora-latest
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - BUNDLE_GEMFILE=/workdir/Gemfile
+
+- label: "Functional Specs Fedora :ruby: 2.6"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - yum install -y crontabs e2fsprogs util-linux
+ - cd /workdir; bundle install --jobs=3 --retry=3 --without omnibus_package docgen ruby_prof
+ - bundle exec rake spec:functional
+ expeditor:
+ executor:
+ docker:
+ image: rubydistros/fedora-latest
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
- label: "Unit Specs Fedora :ruby: 2.6"
commands:
@@ -248,21 +248,20 @@ steps:
# Tests Ruby 2.5
#########################################################################
-# - label: "Integration Specs :ruby: 2.5"
-# commands:
-# - /workdir/scripts/bk_tests/bk_container_prep.sh
-# - bundle install --jobs=3 --retry=3 --without ci docgen guard integration omnibus_package --path vendor/bundle
-# - bundle exec rake spec:integration
-# expeditor:
-# executor:
-# docker:
-# image: ruby:2.5-stretch
-# privileged: true
-# environment:
-# - FORCE_FFI_YAJL=ext
-# - CHEF_LICENSE=accept-no-persist
-# - INTEGRATION_SPECS_25=1
-# - BUNDLE_GEMFILE=/workdir/Gemfile
+- label: "Integration Specs :ruby: 2.5"
+ commands:
+ - /workdir/scripts/bk_tests/bk_container_prep.sh
+ - bundle install --jobs=3 --retry=3 --without omnibus_package docgen
+ - bundle exec rake spec:integration
+ expeditor:
+ executor:
+ docker:
+ image: ruby:2.5-stretch
+ privileged: true
+ environment:
+ - FORCE_FFI_YAJL=ext
+ - CHEF_LICENSE=accept-no-persist
+ - INTEGRATION_SPECS_25=1
- label: "Functional Specs :ruby: 2.5"
commands:
@@ -299,7 +298,7 @@ steps:
# EXTERNAL GEM TESTING
#########################################################################
-- label: "Test chef-sugar-ng gem :ruby: 2.6"
+- label: "Test chef-sugar gem :ruby: 2.6"
commands:
- /workdir/scripts/bk_tests/bk_container_prep.sh
- bundle install --jobs=3 --retry=3 --without omnibus_package docgen
@@ -492,11 +491,11 @@ steps:
privileged: true
single-use: true
-- label: "Kitchen Tests Oracle Linux: 6"
+- label: "Kitchen Tests CentOS: 8"
commands:
- scripts/bk_tests/bk_linux_exec.sh
- cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-6
+ - ~/.asdf/shims/bundle exec kitchen test end-to-end-centos-8
artifact_paths:
- $PWD/.kitchen/logs/kitchen.log
env:
@@ -507,11 +506,11 @@ steps:
privileged: true
single-use: true
-- label: "Kitchen Tests Oracle Linux: 7"
+- label: "Kitchen Tests Oracle Linux: 6"
commands:
- scripts/bk_tests/bk_linux_exec.sh
- cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-7
+ - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-6
artifact_paths:
- $PWD/.kitchen/logs/kitchen.log
env:
@@ -522,11 +521,11 @@ steps:
privileged: true
single-use: true
-- label: "Kitchen Tests Oracle Linux: 8"
+- label: "Kitchen Tests Oracle Linux: 7"
commands:
- scripts/bk_tests/bk_linux_exec.sh
- cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-8
+ - ~/.asdf/shims/bundle exec kitchen test end-to-end-oraclelinux-7
artifact_paths:
- $PWD/.kitchen/logs/kitchen.log
env:
@@ -552,21 +551,6 @@ steps:
privileged: true
single-use: true
-- label: "Kitchen Tests openSUSE Leap: 42"
- commands:
- - scripts/bk_tests/bk_linux_exec.sh
- - cd kitchen-tests
- - ~/.asdf/shims/bundle exec kitchen test end-to-end-opensuse-leap-42
- artifact_paths:
- - $PWD/.kitchen/logs/kitchen.log
- env:
- KITCHEN_YAML: kitchen.yml
- expeditor:
- executor:
- linux:
- privileged: true
- single-use: true
-
- label: "Kitchen Tests openSUSE Leap: 15"
commands:
- scripts/bk_tests/bk_linux_exec.sh
diff --git a/kitchen-tests/Berksfile b/kitchen-tests/Berksfile
index d699452ebe..50e09ebf3b 100644
--- a/kitchen-tests/Berksfile
+++ b/kitchen-tests/Berksfile
@@ -1,4 +1,3 @@
source "https://supermarket.chef.io"
cookbook "end_to_end", path: "cookbooks/end_to_end"
-cookbook "rspec", path: "cookbooks/rspec"
diff --git a/kitchen-tests/cookbooks/end_to_end/Berksfile b/kitchen-tests/cookbooks/end_to_end/Berksfile
deleted file mode 100644
index 967b9a78b6..0000000000
--- a/kitchen-tests/cookbooks/end_to_end/Berksfile
+++ /dev/null
@@ -1,3 +0,0 @@
-source "https://supermarket.chef.io"
-
-metadata
diff --git a/kitchen-tests/cookbooks/end_to_end/metadata.rb b/kitchen-tests/cookbooks/end_to_end/metadata.rb
index 83cea5c9a8..9394d16408 100644
--- a/kitchen-tests/cookbooks/end_to_end/metadata.rb
+++ b/kitchen-tests/cookbooks/end_to_end/metadata.rb
@@ -20,7 +20,7 @@ depends "git"
supports "ubuntu"
supports "debian"
supports "centos"
-supports "opensuse"
+supports "opensuseleap"
supports "fedora"
supports "amazon"
diff --git a/kitchen-tests/cookbooks/rspec/metadata.rb b/kitchen-tests/cookbooks/rspec/metadata.rb
deleted file mode 100644
index 56fb816ce4..0000000000
--- a/kitchen-tests/cookbooks/rspec/metadata.rb
+++ /dev/null
@@ -1,8 +0,0 @@
-name "rspec"
-license "Apache-2.0"
-description "Utility cookbook for rspec testing"
-version "1.0.0"
-
-chef_version ">= 14"
-issues_url "https://github.com/chef/chef/issues"
-source_url "https://github.com/chef/chef"
diff --git a/kitchen-tests/cookbooks/rspec/recipes/default.rb b/kitchen-tests/cookbooks/rspec/recipes/default.rb
deleted file mode 100644
index 4dc1c10d99..0000000000
--- a/kitchen-tests/cookbooks/rspec/recipes/default.rb
+++ /dev/null
@@ -1,13 +0,0 @@
-# we're using chef-client now as a glorified way to push a file to the remote host
-# if we had a way to turn off chef-client converge and push arbitrary files to the
-# remote this complexity could be removed.
-template "/usr/local/bin/run-chef-rspec" do
- source "run-chef-rspec"
- mode 0755
-end
-
-# do NOT even think of trying to add an execute resource here to launch rspec.
-# chefception is proven to be a bad idea, and the rspec tests that really launch
-# chef-client will likely break due to the outer chef-client run. i also do not
-# want to debug rspec's output being filtered through chef-client's logger -- fuck
-# all of that noise.
diff --git a/kitchen-tests/cookbooks/rspec/templates/run-chef-rspec b/kitchen-tests/cookbooks/rspec/templates/run-chef-rspec
deleted file mode 100644
index 54c4297479..0000000000
--- a/kitchen-tests/cookbooks/rspec/templates/run-chef-rspec
+++ /dev/null
@@ -1,11 +0,0 @@
-#!/bin/bash
-
-# remove ip6 entries for docker
-egrep -v "ip6" /etc/hosts > /etc/hosts.new
-cp /etc/hosts.new /etc/hosts
-
-export PATH=/opt/chef/embedded/bin:$PATH
-cd /opt/chef/embedded/apps/chef
-
-/opt/chef/embedded/bin/bundle install
-/opt/chef/embedded/bin/bundle exec /opt/chef/embedded/bin/rspec --format progress
diff --git a/kitchen-tests/kitchen.yml b/kitchen-tests/kitchen.yml
index b94b3067ea..abb85ff783 100644
--- a/kitchen-tests/kitchen.yml
+++ b/kitchen-tests/kitchen.yml
@@ -83,6 +83,14 @@ platforms:
- RUN yum -y install e2fsprogs
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+- name: centos-8
+ driver:
+ image: dokken/centos-8
+ pid_one_command: /usr/lib/systemd/systemd
+ intermediate_instructions:
+ - RUN yum -y install e2fsprogs
+ - RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
+
- name: oraclelinux-6
driver:
image: dokken/oraclelinux-6
@@ -104,6 +112,7 @@ platforms:
pid_one_command: /usr/lib/systemd/systemd
intermediate_instructions:
- RUN yum -y install e2fsprogs
+ - RUN yum -y reinstall systemd
- RUN sed -i -e "s/Defaults.*requiretty.*/Defaults !requiretty/g" /etc/sudoers
- name: fedora-latest
@@ -127,14 +136,6 @@ platforms:
intermediate_instructions:
- RUN /usr/bin/apt-get update
-- name: opensuse-leap-42
- driver:
- image: dokken/opensuse-leap-42
- pid_one_command: /bin/systemd
- intermediate_instructions:
- - RUN /usr/bin/zypper --non-interactive update
- - RUN /usr/bin/zypper --non-interactive install cron
-
- name: opensuse-leap-15
driver:
image: dokken/opensuse-leap-15
@@ -147,9 +148,3 @@ suites:
- name: end-to-end
run_list:
- recipe[end_to_end::default]
- - name: rspec
- run_list:
- - recipe[rspec]
- lifecycle:
- post_converge:
- - remote: /usr/local/bin/run-chef-rspec
diff --git a/omnibus/kitchen.yml b/omnibus/kitchen.yml
index aad8222c58..8921ec080a 100644
--- a/omnibus/kitchen.yml
+++ b/omnibus/kitchen.yml
@@ -39,8 +39,6 @@ platforms:
run_list: apt::default
- name: freebsd-11
run_list: freebsd::portsnap
- - name: ubuntu-14.04
- run_list: apt::default
- name: ubuntu-16.04
run_list: apt::default
- name: ubuntu-18.04
@@ -127,13 +125,6 @@ platforms:
<% end %>
suites:
- # - name: angrychef
- # attributes:
- # omnibus:
- # <<: *attribute_defaults
- # install_dir: /opt/angrychef
- # run_list:
- # - omnibus::default
- name: chef
attributes:
omnibus:
diff --git a/omnibus/omnibus-test.sh b/omnibus/omnibus-test.sh
index 963b91c4b8..95ac30bec4 100644
--- a/omnibus/omnibus-test.sh
+++ b/omnibus/omnibus-test.sh
@@ -147,9 +147,6 @@ elif [[ -d /usr/local/etc/sudoers.d ]]; then
sudo chmod 440 "/usr/local/etc/sudoers.d/$(id -un)-preserve_path"
fi
-# REDO 20190813 - this ulimit can be removed once the macos anka images are updated to support more than 256 open files
-ulimit -S -n 512
-
cd "$chef_gem"
sudo -E bundle install
sudo -E bundle exec rspec -r rspec_junit_formatter -f RspecJunitFormatter -o test.xml -f documentation spec/functional
diff --git a/scripts/bk_tests/bk_install.sh b/scripts/bk_tests/bk_install.sh
deleted file mode 100755
index de74af151c..0000000000
--- a/scripts/bk_tests/bk_install.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
-gem --version
-gem uninstall bundler -a -x || true
-gem install bundler -v $(grep :bundler omnibus_overrides.rb | cut -d'"' -f2)
-bundle --version
-rm -f .bundle/config
-# force all .rspec tests into progress display to reduce line count
-echo --color > .rspec
-echo -fp >> .rspec
diff --git a/scripts/bk_tests/bk_linux_exec.sh b/scripts/bk_tests/bk_linux_exec.sh
index 805397a361..cc8842bcf3 100755
--- a/scripts/bk_tests/bk_linux_exec.sh
+++ b/scripts/bk_tests/bk_linux_exec.sh
@@ -32,9 +32,9 @@ sudo git clone https://github.com/asdf-vm/asdf.git /opt/asdf
echo "--- Installing Ruby ASDF plugin"
/opt/asdf/bin/asdf plugin-add ruby https://github.com/asdf-vm/asdf-ruby.git
-echo "--- Installing Ruby 2.5.6"
-/opt/asdf/bin/asdf install ruby 2.5.6
-/opt/asdf/bin/asdf global ruby 2.5.6
+echo "--- Installing Ruby 2.5.7"
+/opt/asdf/bin/asdf install ruby 2.5.7
+/opt/asdf/bin/asdf global ruby 2.5.7
# Update Gems
gem update --system $(grep rubygems omnibus_overrides.rb | cut -d'"' -f2)
diff --git a/scripts/bk_tests/bk_win_functional.ps1 b/scripts/bk_tests/bk_win_functional.ps1
index 085f22e40c..23b7263529 100755
--- a/scripts/bk_tests/bk_win_functional.ps1
+++ b/scripts/bk_tests/bk_win_functional.ps1
@@ -14,17 +14,17 @@ $ErrorActionPreference = 'Stop'
echo "Downloading Ruby + DevKit"
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
-(New-Object System.Net.WebClient).DownloadFile('https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.4-1/rubyinstaller-devkit-2.6.4-1-x64.exe', 'c:\\rubyinstaller-devkit-2.6.4-1-x64.exe')
+(New-Object System.Net.WebClient).DownloadFile('https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.5.7-1/rubyinstaller-devkit-2.6.5-1-x64.exe', 'c:\\rubyinstaller-devkit-2.6.5-1-x64.exe')
echo "Installing Ruby + DevKit"
-Start-Process c:\rubyinstaller-devkit-2.6.4-1-x64.exe -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait
+Start-Process c:\rubyinstaller-devkit-2.5.7-1-x64.exe -ArgumentList '/verysilent /dir=C:\\ruby26' -Wait
echo "Cleaning up installation"
-Remove-Item c:\rubyinstaller-devkit-2.6.4-1-x64.exe -Force
+Remove-Item c:\rubyinstaller-devkit-2.5.7-1-x64.exe -Force
echo "Closing out the layer (this can take awhile)"
# Set-Item -Path Env:Path -Value to include ruby26
-$Env:Path+=";C:\ruby26\bin"
+$Env:Path+=";C:\ruby25\bin"
winrm quickconfig -q
ruby -v