diff --git a/.travis.yml b/.travis.yml index bf287c2..55c74bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -11,13 +11,11 @@ before_install: env: matrix: - INSTANCE: deb-debian-9 - - INSTANCE: deb-debian-8-backports - - INSTANCE: deb-ubuntu-1604 - - INSTANCE: deb-ubuntu-1804 + - INSTANCE: ubu-ubuntu-1604 + - INSTANCE: ubu-ubuntu-1804 - INSTANCE: rpm-centos-7 - INSTANCE: fed-fedora - INSTANCE: rpm-opensuse-leap-salt-minion script: - bundle exec kitchen verify ${INSTANCE} - diff --git a/kitchen.yml b/kitchen.yml index 6b4d171..b05be8f 100644 --- a/kitchen.yml +++ b/kitchen.yml @@ -21,12 +21,6 @@ platforms: run_command: /lib/systemd/systemd provision_command: - apt-get update && apt-get install -y udev - - name: debian-8-backports - driver_config: - image: debian:jessie-backports - run_command: /lib/systemd/systemd - provision_command: - - apt-get update && apt-get install -y udev - name: ubuntu-18.04 driver_config: image: ubuntu:18.04 @@ -38,11 +32,15 @@ platforms: image: ubuntu:16.04 run_command: /lib/systemd/systemd provision_command: - - apt-get update && apt-get install -y udev + - apt-get update && apt-get install -y udev locales + - locale-gen en_US.UTF-8 + - update-locale LANG=en_US.UTF-8 - name: centos-7 driver_config: image: centos:7 run_command: /usr/lib/systemd/systemd + provision_command: + - yum -y update && yum -y install udev git # - name: centos-6 # driver_config: # image: centos:6 @@ -52,7 +50,7 @@ platforms: image: fedora run_command: /usr/lib/systemd/systemd provision_command: - - yum -y update && yum -y install udev + - yum -y update && yum -y install udev git # As of February 2019, there have been problems getting `opensuse` to work: # * `opensuse` is deprecated # * `opensuse/leap` grabs `15.x`, which doesn't run the `inspec` tests @@ -64,7 +62,7 @@ platforms: image: opensuse/salt-minion run_command: /usr/lib/systemd/systemd provision_command: - - zypper refresh && zypper install -y udev + - zypper refresh && zypper install -y udev git - systemctl enable sshd.service - cat /etc/os-release @@ -101,14 +99,34 @@ verifier: suites: - name: deb excludes: + - ubuntu-16.04 + - ubuntu-18.04 - centos-7 - fedora - opensuse-leap-salt-minion + - name: ubu18 + excludes: + - debian-9 + - ubuntu-16.04 + - centos-7 + - fedora + - opensuse-leap-salt-minion + + - name: ubu16 + excludes: + - debian-9 + - ubuntu-18.04 + - centos-7 + - fedora + - opensuse-leap-salt-minion + provisioner: + pillars-from-files: + packages.sls: test/integration/default/pillar.example.ubuntu.1604 + - name: fed excludes: - debian-9 - - debian-8-backports - ubuntu-16.04 - ubuntu-18.04 - centos-7 @@ -120,7 +138,6 @@ suites: - name: rpm excludes: - debian-9 - - debian-8-backports - ubuntu-16.04 - ubuntu-18.04 - fedora diff --git a/pillar.example b/pillar.example index 7059cc7..b2f950f 100644 --- a/pillar.example +++ b/pillar.example @@ -24,9 +24,13 @@ packages: - wget - git pips: - #required: - # pkgs: - # - python2-pip + required: + pkgs: + # Pillar parameters have precedence so, if you add a package here, you + # should also add the python pip package you want. Otherwise, the formula + # will take care of getting it if needed. + - libpython2.7-dev + - python-pip wanted: - dxpy - attrs diff --git a/test/integration/default/pillar.example.ubuntu.1604 b/test/integration/default/pillar.example.ubuntu.1604 new file mode 100644 index 0000000..887b33f --- /dev/null +++ b/test/integration/default/pillar.example.ubuntu.1604 @@ -0,0 +1,92 @@ +packages: + pkgs: + # A dict of "package: version" pairs: + held: + alien: 8.95 + iotop: 0.6-1 + + # 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 + 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' + diff --git a/test/integration/default/pkgs_spec.rb b/test/integration/default/pkgs_spec.rb index 8aec082..07f0910 100644 --- a/test/integration/default/pkgs_spec.rb +++ b/test/integration/default/pkgs_spec.rb @@ -31,7 +31,8 @@ when 'debian', 'ubuntu' os_packages = %w() held_packages = { 'alien': '8.95', - 'iotop': '0.6-2' + # To match also ubuntu16's + 'iotop': '0.6-' } lock_file = '/var/lib/dpkg/status' end