mirror of
https://github.com/saltstack-formulas/packages-formula.git
synced 2025-04-16 09:40:23 +00:00
Fix tests, add other distros
This commit is contained in:
parent
d855430752
commit
7b74a1bec9
9 changed files with 188 additions and 31 deletions
|
@ -11,11 +11,11 @@ before_install:
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
- INSTANCE: deb-debian-9
|
- INSTANCE: deb-debian-9
|
||||||
- INSTANCE: ubu-ubuntu-1604
|
- INSTANCE: ubu16-ubuntu-1604
|
||||||
- INSTANCE: ubu-ubuntu-1804
|
- INSTANCE: ubu18-ubuntu-1804
|
||||||
- INSTANCE: rpm-centos-7
|
- INSTANCE: rpm-centos-7
|
||||||
- INSTANCE: fed-fedora
|
- INSTANCE: fed-fedora
|
||||||
- INSTANCE: rpm-opensuse-leap-salt-minion
|
- INSTANCE: sus-opensuse-leap-salt-minion
|
||||||
|
|
||||||
script:
|
script:
|
||||||
- bundle exec kitchen verify ${INSTANCE}
|
- bundle exec kitchen verify ${INSTANCE}
|
||||||
|
|
39
kitchen.yml
39
kitchen.yml
|
@ -20,13 +20,13 @@ platforms:
|
||||||
image: debian:9
|
image: debian:9
|
||||||
run_command: /lib/systemd/systemd
|
run_command: /lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- apt-get update && apt-get install -y udev
|
- apt-get update && apt-get install -y udev locales
|
||||||
- name: ubuntu-18.04
|
- name: ubuntu-18.04
|
||||||
driver_config:
|
driver_config:
|
||||||
image: ubuntu:18.04
|
image: ubuntu:18.04
|
||||||
run_command: /lib/systemd/systemd
|
run_command: /lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- apt-get update && apt-get install -y udev
|
- apt-get update && apt-get install -y udev locales
|
||||||
- name: ubuntu-16.04
|
- name: ubuntu-16.04
|
||||||
driver_config:
|
driver_config:
|
||||||
image: ubuntu:16.04
|
image: ubuntu:16.04
|
||||||
|
@ -41,16 +41,16 @@ platforms:
|
||||||
run_command: /usr/lib/systemd/systemd
|
run_command: /usr/lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- yum -y update && yum -y install udev git
|
- yum -y update && yum -y install udev git
|
||||||
# - name: centos-6
|
# To test remote packages in RPM envs
|
||||||
# driver_config:
|
- rpm --import https://zoom.us/linux/download/pubkey
|
||||||
# image: centos:6
|
|
||||||
# run_command: /usr/lib/systemd/systemd
|
|
||||||
- name: fedora
|
- name: fedora
|
||||||
driver_config:
|
driver_config:
|
||||||
image: fedora
|
image: fedora
|
||||||
run_command: /usr/lib/systemd/systemd
|
run_command: /usr/lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- yum -y update && yum -y install udev git
|
- yum -y update && yum -y install udev git
|
||||||
|
# To test remote packages in RPM envs
|
||||||
|
- rpm --import https://zoom.us/linux/download/pubkey
|
||||||
# As of February 2019, there have been problems getting `opensuse` to work:
|
# As of February 2019, there have been problems getting `opensuse` to work:
|
||||||
# * `opensuse` is deprecated
|
# * `opensuse` is deprecated
|
||||||
# * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests
|
# * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests
|
||||||
|
@ -62,9 +62,11 @@ platforms:
|
||||||
image: opensuse/salt-minion
|
image: opensuse/salt-minion
|
||||||
run_command: /usr/lib/systemd/systemd
|
run_command: /usr/lib/systemd/systemd
|
||||||
provision_command:
|
provision_command:
|
||||||
- zypper refresh && zypper install -y udev git
|
- zypper refresh && zypper install -y udev git glibc-locale
|
||||||
- systemctl enable sshd.service
|
- systemctl enable sshd.service
|
||||||
- cat /etc/os-release
|
- cat /etc/os-release
|
||||||
|
# To test remote packages in RPM envs
|
||||||
|
- rpm --import https://zoom.us/linux/download/pubkey
|
||||||
|
|
||||||
provisioner:
|
provisioner:
|
||||||
name: salt_solo
|
name: salt_solo
|
||||||
|
@ -75,7 +77,7 @@ provisioner:
|
||||||
salt_copy_filter:
|
salt_copy_filter:
|
||||||
- .kitchen
|
- .kitchen
|
||||||
- .git
|
- .git
|
||||||
pillars-from-files:
|
pillars_from_files:
|
||||||
packages.sls: pillar.example
|
packages.sls: pillar.example
|
||||||
pillars:
|
pillars:
|
||||||
top.sls:
|
top.sls:
|
||||||
|
@ -112,6 +114,9 @@ suites:
|
||||||
- centos-7
|
- centos-7
|
||||||
- fedora
|
- fedora
|
||||||
- opensuse-leap-salt-minion
|
- opensuse-leap-salt-minion
|
||||||
|
provisioner:
|
||||||
|
pillars_from_files:
|
||||||
|
packages.sls: test/integration/default/pillar.example.ubuntu.1804
|
||||||
|
|
||||||
- name: ubu16
|
- name: ubu16
|
||||||
excludes:
|
excludes:
|
||||||
|
@ -121,7 +126,7 @@ suites:
|
||||||
- fedora
|
- fedora
|
||||||
- opensuse-leap-salt-minion
|
- opensuse-leap-salt-minion
|
||||||
provisioner:
|
provisioner:
|
||||||
pillars-from-files:
|
pillars_from_files:
|
||||||
packages.sls: test/integration/default/pillar.example.ubuntu.1604
|
packages.sls: test/integration/default/pillar.example.ubuntu.1604
|
||||||
|
|
||||||
- name: fed
|
- name: fed
|
||||||
|
@ -132,15 +137,27 @@ suites:
|
||||||
- centos-7
|
- centos-7
|
||||||
- opensuse-leap-salt-minion
|
- opensuse-leap-salt-minion
|
||||||
provisioner:
|
provisioner:
|
||||||
pillars-from-files:
|
pillars_from_files:
|
||||||
packages.sls: test/integration/default/pillar.example.fedora
|
packages.sls: test/integration/default/pillar.example.fedora
|
||||||
|
|
||||||
|
- name: sus
|
||||||
|
excludes:
|
||||||
|
- debian-9
|
||||||
|
- ubuntu-16.04
|
||||||
|
- ubuntu-18.04
|
||||||
|
- centos-7
|
||||||
|
- fedora
|
||||||
|
provisioner:
|
||||||
|
pillars_from_files:
|
||||||
|
packages.sls: test/integration/default/pillar.example.opensuse
|
||||||
|
|
||||||
- name: rpm
|
- name: rpm
|
||||||
excludes:
|
excludes:
|
||||||
- debian-9
|
- debian-9
|
||||||
- ubuntu-16.04
|
- ubuntu-16.04
|
||||||
- ubuntu-18.04
|
- ubuntu-18.04
|
||||||
- fedora
|
- fedora
|
||||||
|
- opensuse-leap-salt-minion
|
||||||
provisioner:
|
provisioner:
|
||||||
dependencies:
|
dependencies:
|
||||||
- name: epel
|
- name: epel
|
||||||
|
@ -151,7 +168,7 @@ suites:
|
||||||
'*':
|
'*':
|
||||||
- epel
|
- epel
|
||||||
- packages
|
- packages
|
||||||
pillars-from-files:
|
pillars_from_files:
|
||||||
packages.sls: test/integration/default/pillar.example.redhat
|
packages.sls: test/integration/default/pillar.example.redhat
|
||||||
pillars:
|
pillars:
|
||||||
top.sls:
|
top.sls:
|
||||||
|
|
|
@ -5,6 +5,10 @@ Suse:
|
||||||
required:
|
required:
|
||||||
pkgs:
|
pkgs:
|
||||||
- python3-pip
|
- python3-pip
|
||||||
|
gems:
|
||||||
|
required:
|
||||||
|
pkgs:
|
||||||
|
- ruby-common
|
||||||
|
|
||||||
Debian:
|
Debian:
|
||||||
pips:
|
pips:
|
||||||
|
|
|
@ -53,7 +53,7 @@ packages pips install {{ pn }}:
|
||||||
packages pips remove {{ upn }}:
|
packages pips remove {{ upn }}:
|
||||||
{%- if grains.os_family in ('Suse',) %}
|
{%- if grains.os_family in ('Suse',) %}
|
||||||
cmd.run:
|
cmd.run:
|
||||||
- name: /usr/bin/pip uninstall {{ pn }}
|
- name: /usr/bin/pip uninstall {{ upn }}
|
||||||
{%- else %}
|
{%- else %}
|
||||||
pip.removed:
|
pip.removed:
|
||||||
- name: {{ upn }}
|
- name: {{ upn }}
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
packages:
|
packages:
|
||||||
pkgs:
|
pkgs:
|
||||||
held:
|
held:
|
||||||
alien: 8.95-5.fc27
|
alien: 8.95-8.fc29
|
||||||
iotop: 0.6-15.fc27
|
iotop: 0.6-18.fc29
|
||||||
wanted:
|
wanted:
|
||||||
- git
|
- git
|
||||||
- less
|
- less
|
||||||
|
@ -16,14 +16,16 @@ packages:
|
||||||
- git
|
- git
|
||||||
- python2-dnf-plugin-versionlock
|
- python2-dnf-plugin-versionlock
|
||||||
- python3-dnf-plugin-versionlock
|
- python3-dnf-plugin-versionlock
|
||||||
pips:
|
# Not testing pips in FC29 because it still ships 2018.3.3
|
||||||
wanted:
|
# which breaks with pip > 18 (https://github.com/saltstack/salt/issues/49967)
|
||||||
- dxpy
|
# pips:
|
||||||
- attrs
|
# wanted:
|
||||||
unwanted:
|
# - dxpy
|
||||||
- campbel
|
# - attrs
|
||||||
- reverse_geocode
|
# unwanted:
|
||||||
- indy-crypto
|
# - campbel
|
||||||
|
# - reverse_geocode
|
||||||
|
# - indy-crypto
|
||||||
gems:
|
gems:
|
||||||
wanted:
|
wanted:
|
||||||
- progressbar
|
- progressbar
|
||||||
|
|
27
test/integration/default/pillar.example.opensuse
Normal file
27
test/integration/default/pillar.example.opensuse
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
packages:
|
||||||
|
pkgs:
|
||||||
|
wanted:
|
||||||
|
- git
|
||||||
|
- less
|
||||||
|
- bc
|
||||||
|
- curl
|
||||||
|
- fail2ban
|
||||||
|
unwanted:
|
||||||
|
- avahi-daemon
|
||||||
|
required:
|
||||||
|
pkgs:
|
||||||
|
- git
|
||||||
|
# Not testing pips in opensuse because it requires upgrading a bunch of
|
||||||
|
# pip dependencies which are out of the scope of this formula.
|
||||||
|
# If you can provide a PR to fix this tests, you're welcomed!
|
||||||
|
# pips:
|
||||||
|
gems:
|
||||||
|
wanted:
|
||||||
|
- progressbar
|
||||||
|
- minitest
|
||||||
|
unwanted:
|
||||||
|
- diff-lcs
|
||||||
|
- kitchen-vagrant
|
||||||
|
- kwalify
|
||||||
|
remote_pkgs:
|
||||||
|
zoom: 'https://zoom.us/client/latest/zoom_openSUSE_x86_64.rpm'
|
94
test/integration/default/pillar.example.ubuntu.1804
Normal file
94
test/integration/default/pillar.example.ubuntu.1804
Normal file
|
@ -0,0 +1,94 @@
|
||||||
|
packages:
|
||||||
|
pkgs:
|
||||||
|
# A dict of "package: version" pairs:
|
||||||
|
held:
|
||||||
|
alien: 8.95
|
||||||
|
iotop: 0.6-2
|
||||||
|
|
||||||
|
# Alternativelly, held packages can also be specified as a list with
|
||||||
|
# no versions. In this case, the package will be held in the installed
|
||||||
|
# version.
|
||||||
|
# held:
|
||||||
|
# - alien
|
||||||
|
# - iotop
|
||||||
|
wanted:
|
||||||
|
- git
|
||||||
|
- less
|
||||||
|
- bc
|
||||||
|
- curl
|
||||||
|
- fail2ban
|
||||||
|
unwanted:
|
||||||
|
- avahi-daemon
|
||||||
|
required:
|
||||||
|
pkgs:
|
||||||
|
- wget
|
||||||
|
- git
|
||||||
|
pips:
|
||||||
|
required:
|
||||||
|
pkgs:
|
||||||
|
- libpython2.7-dev
|
||||||
|
- python-pip
|
||||||
|
wanted:
|
||||||
|
- dxpy
|
||||||
|
- attrs
|
||||||
|
unwanted:
|
||||||
|
- campbel
|
||||||
|
- reverse_geocode
|
||||||
|
- indy-crypto
|
||||||
|
config:
|
||||||
|
global:
|
||||||
|
timeout: 120
|
||||||
|
default-timeout: 120
|
||||||
|
# proxy: http://proxy.example.com:3128
|
||||||
|
gems:
|
||||||
|
wanted:
|
||||||
|
- progressbar
|
||||||
|
- minitest
|
||||||
|
unwanted:
|
||||||
|
- diff-lcs
|
||||||
|
- kitchen-vagrant
|
||||||
|
- kwalify
|
||||||
|
# Disable Snaps testing in Ubuntu 18 due to
|
||||||
|
# https://github.com/saltstack-formulas/packages-formula/issues/44
|
||||||
|
# snaps:
|
||||||
|
# wanted:
|
||||||
|
# - hello-world
|
||||||
|
# classic:
|
||||||
|
# - test-snapd-hello-classic
|
||||||
|
# unwanted:
|
||||||
|
# - goodbye-world
|
||||||
|
archives:
|
||||||
|
wanted:
|
||||||
|
terminator:
|
||||||
|
dest: /usr/local/terminator/
|
||||||
|
options: '--strip-components=1' #recommended option, but beware tarbombs
|
||||||
|
dl:
|
||||||
|
format: tar
|
||||||
|
source: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz
|
||||||
|
#hashurl: https://launchpad.net/terminator/gtk3/1.91/+download/terminator-1.91.tar.gz/+md5
|
||||||
|
hashsum: md5=2eed999d7a41f2e18eaa511bbbf80f58
|
||||||
|
phantomjs:
|
||||||
|
dest: /usr/local/src/ #beware tarbombs
|
||||||
|
user: root
|
||||||
|
mode: '0700'
|
||||||
|
dl:
|
||||||
|
format: tar
|
||||||
|
source: https://bitbucket.org/ariya/phantomjs/downloads/phantomjs-2.1.1-linux-x86_64.tar.bz2
|
||||||
|
hashsum: md5=1c947d57fce2f21ce0b43fe2ed7cd361
|
||||||
|
blockbox:
|
||||||
|
dest: /usr/local/src/
|
||||||
|
dl:
|
||||||
|
format: raw
|
||||||
|
source: https://raw.githubusercontent.com/openstack/cinder/master/contrib/block-box/docker-compose.yml
|
||||||
|
hashsum: 1751f8e4f6b4cddd8c4843a0f4473274
|
||||||
|
kubectl:
|
||||||
|
dest: /usr/local/bin
|
||||||
|
dl:
|
||||||
|
format: bin
|
||||||
|
source: https://storage.googleapis.com/kubernetes-release/release/v1.12.0/bin/darwin/amd64/kubectl
|
||||||
|
unwanted:
|
||||||
|
- /usr/local/boring_archive_software
|
||||||
|
|
||||||
|
remote_pkgs:
|
||||||
|
zoom: 'https://zoom.us/client/latest/zoom_amd64.deb'
|
||||||
|
|
|
@ -1,11 +1,18 @@
|
||||||
### WANTED/REQUIRED
|
### WANTED/REQUIRED
|
||||||
|
case os[:name]
|
||||||
|
when 'fedora', 'opensuse'
|
||||||
|
wanted_pips = []
|
||||||
|
else
|
||||||
|
wanted_pips = %w{
|
||||||
|
dxpy
|
||||||
|
attrs
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
control 'Wanted/Required python packages' do
|
control 'Wanted/Required python packages' do
|
||||||
title 'should be installed'
|
title 'should be installed'
|
||||||
|
|
||||||
%w{
|
wanted_pips.each do |p|
|
||||||
dxpy
|
|
||||||
attrs
|
|
||||||
}.each do |p|
|
|
||||||
describe pip(p) do
|
describe pip(p) do
|
||||||
it { should be_installed }
|
it { should be_installed }
|
||||||
end
|
end
|
||||||
|
|
|
@ -23,10 +23,16 @@ when 'fedora'
|
||||||
python3-dnf-plugin-versionlock
|
python3-dnf-plugin-versionlock
|
||||||
)
|
)
|
||||||
held_packages = {
|
held_packages = {
|
||||||
'alien': '8.95-5.fc27',
|
'alien': '8.95-8.fc29',
|
||||||
'iotop': '0.6-15.fc27'
|
'iotop': '0.6-18.fc29'
|
||||||
}
|
}
|
||||||
lock_file = '/etc/dnf/plugins/versionlock.list'
|
lock_file = '/etc/dnf/plugins/versionlock.list'
|
||||||
|
# Adding empty Suse entries, to get tests passing
|
||||||
|
# Don't know the correct values to add here.
|
||||||
|
when 'opensuse'
|
||||||
|
os_packages = %w()
|
||||||
|
held_packages = {}
|
||||||
|
lock_file = ''
|
||||||
when 'debian', 'ubuntu'
|
when 'debian', 'ubuntu'
|
||||||
os_packages = %w()
|
os_packages = %w()
|
||||||
held_packages = {
|
held_packages = {
|
||||||
|
|
Loading…
Add table
Reference in a new issue