diff options
Diffstat (limited to 'spec')
41 files changed, 572 insertions, 112 deletions
diff --git a/spec/acceptance/nodesets/centos-5-x86_64-docker.yml b/spec/acceptance/nodesets/centos-5-x86_64-docker.yml new file mode 100644 index 0000000..679afb0 --- /dev/null +++ b/spec/acceptance/nodesets/centos-5-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + centos-5-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-5-x86_64 + hypervisor : docker + image: centos:5 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs tar wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/centos-5.yml b/spec/acceptance/nodesets/centos-5.yml new file mode 100644 index 0000000..a26f27f --- /dev/null +++ b/spec/acceptance/nodesets/centos-5.yml @@ -0,0 +1,16 @@ +HOSTS: + centos-5-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-5-x86_64 + hypervisor : docker + image: tianon/centos:5.10 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs tar wget which' + - 'sed -i -e "/mingetty/d" /etc/inittab' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/centos-6-x86_64-docker.yml b/spec/acceptance/nodesets/centos-6-x86_64-docker.yml new file mode 100644 index 0000000..9cab03d --- /dev/null +++ b/spec/acceptance/nodesets/centos-6-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + centos-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-6-x86_64 + hypervisor : docker + image: centos:6 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs tar wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml b/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml new file mode 100644 index 0000000..e325b9e --- /dev/null +++ b/spec/acceptance/nodesets/centos-6-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + centos-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-6-x86_64 + hypervisor : openstack + flavor: m1.small + image: centos-6-latest + user: root +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml b/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml new file mode 100644 index 0000000..f06036e --- /dev/null +++ b/spec/acceptance/nodesets/centos-6-x86_64-vagrant.yml @@ -0,0 +1,11 @@ +HOSTS: + centos-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-6-x86_64 + hypervisor : vagrant + box : camptocamp/centos-6-x86_64 +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/centos-6.yml b/spec/acceptance/nodesets/centos-6.yml new file mode 100644 index 0000000..71e23cd --- /dev/null +++ b/spec/acceptance/nodesets/centos-6.yml @@ -0,0 +1,17 @@ +HOSTS: + centos-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-6-x86_64 + hypervisor : docker + image: centos:6 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'rm -rf /var/run/network/*' + - 'yum install -y crontabs tar wget' + - 'rm /etc/init/tty.conf' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/centos-7-x86_64-docker.yml b/spec/acceptance/nodesets/centos-7-x86_64-docker.yml index 599a681..0bc9727 100644 --- a/spec/acceptance/nodesets/centos-7-x86_64-docker.yml +++ b/spec/acceptance/nodesets/centos-7-x86_64-docker.yml @@ -1,12 +1,15 @@ HOSTS: centos-7-x64: default_apply_opts: + order: random strict_variables: platform: el-7-x86_64 hypervisor : docker image: centos:7 - # This stops the image from being deleted on completion, speeding up the process. docker_preserve_image: true + docker_cmd: '["/usr/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs tar wget' CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml b/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml index 37dfc5f..9003c86 100644 --- a/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml +++ b/spec/acceptance/nodesets/centos-7-x86_64-openstack.yml @@ -1,11 +1,12 @@ HOSTS: centos-7-x64: default_apply_opts: + order: random strict_variables: platform: el-7-x86_64 hypervisor : openstack flavor: m1.small - image: centos-7-x86_64-genericcloud-20140929_01 + image: centos-7-latest user: centos CONFIG: type: foss diff --git a/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml b/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml index fe0f83b..95402e5 100644 --- a/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml +++ b/spec/acceptance/nodesets/centos-7-x86_64-vagrant.yml @@ -1,10 +1,11 @@ HOSTS: centos-7-x64: default_apply_opts: + order: random strict_variables: platform: el-7-x86_64 hypervisor : vagrant - box : puppetlabs/centos-7.0-64-nocm + box : camptocamp/centos-7-x86_64 CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/centos-7.yml b/spec/acceptance/nodesets/centos-7.yml new file mode 100644 index 0000000..a8fa468 --- /dev/null +++ b/spec/acceptance/nodesets/centos-7.yml @@ -0,0 +1,15 @@ +HOSTS: + centos-7-x64: + default_apply_opts: + order: random + strict_variables: + platform: el-7-x86_64 + hypervisor : docker + image: centos:7 + docker_preserve_image: true + docker_cmd: '["/usr/sbin/init"]' + docker_image_commands: + - 'yum install -y crontabs tar wget iproute' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/debian-6-x86_64-docker.yml b/spec/acceptance/nodesets/debian-6-x86_64-docker.yml index 0296d12..359dae7 100644 --- a/spec/acceptance/nodesets/debian-6-x86_64-docker.yml +++ b/spec/acceptance/nodesets/debian-6-x86_64-docker.yml @@ -1,12 +1,15 @@ HOSTS: debian-6-x64: default_apply_opts: + order: random strict_variables: platform: debian-6-amd64 hypervisor : docker image: debian:6 - # This stops the image from being deleted on completion, speeding up the process. docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y wget' CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml new file mode 100644 index 0000000..c6c192f --- /dev/null +++ b/spec/acceptance/nodesets/debian-6-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + debian-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: debian-6-amd64 + hypervisor : openstack + flavor: m1.small + image: debian-6-latest + user: debian +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml index 23dae1b..03db0fa 100644 --- a/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml +++ b/spec/acceptance/nodesets/debian-6-x86_64-vagrant.yml @@ -1,6 +1,7 @@ HOSTS: debian-6-x64: default_apply_opts: + order: random strict_variables: platform: debian-6-amd64 hypervisor : vagrant diff --git a/spec/acceptance/nodesets/debian-6.yml b/spec/acceptance/nodesets/debian-6.yml new file mode 100644 index 0000000..d7b0275 --- /dev/null +++ b/spec/acceptance/nodesets/debian-6.yml @@ -0,0 +1,15 @@ +HOSTS: + debian-6-x64: + default_apply_opts: + order: random + strict_variables: + platform: debian-6-amd64 + hypervisor : docker + image: debian/eol:squeeze + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y cron locales-all net-tools wget' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/debian-7-x86_64-docker.yml b/spec/acceptance/nodesets/debian-7-x86_64-docker.yml index ef1c9b2..fc11f57 100644 --- a/spec/acceptance/nodesets/debian-7-x86_64-docker.yml +++ b/spec/acceptance/nodesets/debian-7-x86_64-docker.yml @@ -1,12 +1,15 @@ HOSTS: debian-7-x64: default_apply_opts: + order: random strict_variables: platform: debian-7-amd64 hypervisor : docker image: debian:7 - # This stops the image from being deleted on completion, speeding up the process. docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y cron wget' CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml index e52336b..017b4c7 100644 --- a/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml +++ b/spec/acceptance/nodesets/debian-7-x86_64-openstack.yml @@ -1,11 +1,12 @@ HOSTS: debian-7-x64: default_apply_opts: + order: random strict_variables: platform: debian-7-amd64 hypervisor : openstack flavor: m1.small - image: debian-7-amd64-20141121 + image: debian-7-latest user: debian CONFIG: type: foss diff --git a/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml index 86c2165..8ed1264 100644 --- a/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml +++ b/spec/acceptance/nodesets/debian-7-x86_64-vagrant.yml @@ -1,10 +1,11 @@ HOSTS: debian-7-x64: default_apply_opts: + order: random strict_variables: platform: debian-7-amd64 hypervisor : vagrant - box : puppetlabs/debian-7.8-64-nocm + box : camptocamp/debian-7-amd64 CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/debian-7.yml b/spec/acceptance/nodesets/debian-7.yml new file mode 100644 index 0000000..9591ea7 --- /dev/null +++ b/spec/acceptance/nodesets/debian-7.yml @@ -0,0 +1,15 @@ +HOSTS: + debian-7-x64: + default_apply_opts: + order: random + strict_variables: + platform: debian-7-amd64 + hypervisor : docker + image: debian:7 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y cron locales-all net-tools wget' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/debian-8-x86_64-docker.yml b/spec/acceptance/nodesets/debian-8-x86_64-docker.yml index 28c3e02..86a55e1 100644 --- a/spec/acceptance/nodesets/debian-8-x86_64-docker.yml +++ b/spec/acceptance/nodesets/debian-8-x86_64-docker.yml @@ -1,12 +1,15 @@ HOSTS: debian-8-x64: default_apply_opts: + order: random strict_variables: platform: debian-8-amd64 hypervisor : docker image: debian:8 - # This stops the image from being deleted on completion, speeding up the process. docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y cron wget' CONFIG: type: foss log_level: debug diff --git a/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml b/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml index 194ca46..003b6f4 100644 --- a/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml +++ b/spec/acceptance/nodesets/debian-8-x86_64-openstack.yml @@ -1,13 +1,14 @@ HOSTS: debian-8-x64: default_apply_opts: + order: random strict_variables: platform: debian-8-amd64 hypervisor : openstack flavor: m1.small - image: debian-8-amd64-20141121 + image: debian-8-latest user: debian CONFIG: type: foss - openstack_network: default log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml b/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml new file mode 100644 index 0000000..5cc7f0c --- /dev/null +++ b/spec/acceptance/nodesets/debian-8-x86_64-vagrant.yml @@ -0,0 +1,11 @@ +HOSTS: + debian-8-x64: + default_apply_opts: + order: random + strict_variables: + platform: debian-8-amd64 + hypervisor : vagrant + box : camptocamp/debian-8-amd64 +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/debian-8.yml b/spec/acceptance/nodesets/debian-8.yml new file mode 100644 index 0000000..5fb24c6 --- /dev/null +++ b/spec/acceptance/nodesets/debian-8.yml @@ -0,0 +1,16 @@ +HOSTS: + debian-8-x64: + default_apply_opts: + order: random + strict_variables: + platform: debian-8-amd64 + hypervisor : docker + image: debian:8 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y cron locales-all net-tools wget' + - 'rm -f /usr/sbin/policy-rc.d' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml new file mode 100644 index 0000000..933dee6 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-10.04-x86_64-docker.yml @@ -0,0 +1,13 @@ +HOSTS: + ubuntu-1004-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-10.04-amd64 + hypervisor : docker + image: ubuntu:10.04 + # This stops the image from being deleted on completion, speeding up the process. + docker_preserve_image: true +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml new file mode 100644 index 0000000..f0ec72b --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + ubuntu-1204-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-12.04-amd64 + hypervisor : docker + image: ubuntu:12.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml new file mode 100644 index 0000000..f81b04b --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-12.04-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + ubuntu-1204-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-12.04-amd64 + hypervisor : openstack + flavor: m1.small + image: ubuntu-1204-latest + user: ubuntu +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-12.04.yml b/spec/acceptance/nodesets/ubuntu-12.04.yml new file mode 100644 index 0000000..594e177 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-12.04.yml @@ -0,0 +1,16 @@ +HOSTS: + ubuntu-1204-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-12.04-amd64 + hypervisor : docker + image: ubuntu:12.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml new file mode 100644 index 0000000..6fb9281 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + ubuntu-1404-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.04-amd64 + hypervisor : docker + image: ubuntu:14.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml new file mode 100644 index 0000000..2eeb912 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + ubuntu-1404-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.04-amd64 + hypervisor : openstack + flavor: m1.small + image: ubuntu-1404-latest + user: ubuntu +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml index a3edb70..3b37695 100644 --- a/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml +++ b/spec/acceptance/nodesets/ubuntu-14.04-x86_64-vagrant.yml @@ -1,6 +1,7 @@ HOSTS: - ubuntu-14.04-x64: + ubuntu-1404-x64: default_apply_opts: + order: random strict_variables: platform: ubuntu-14.04-amd64 hypervisor : vagrant diff --git a/spec/acceptance/nodesets/ubuntu-14.04.yml b/spec/acceptance/nodesets/ubuntu-14.04.yml new file mode 100644 index 0000000..2b293c9 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.04.yml @@ -0,0 +1,18 @@ +HOSTS: + ubuntu-1404-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.04-amd64 + hypervisor : docker + image: ubuntu:14.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'rm /usr/sbin/policy-rc.d' + - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml new file mode 100644 index 0000000..2be425c --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + ubuntu-1410-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.10-amd64 + hypervisor : docker + image: ubuntu:14.10 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml new file mode 100644 index 0000000..58a2acd --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.10-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + ubuntu-1410-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.10-amd64 + hypervisor : openstack + flavor: m1.small + image: ubuntu-1410-latest + user: ubuntu +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-14.10.yml b/spec/acceptance/nodesets/ubuntu-14.10.yml new file mode 100644 index 0000000..7ce09b2 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-14.10.yml @@ -0,0 +1,18 @@ +HOSTS: + ubuntu-1410-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-14.10-amd64 + hypervisor : docker + image: ubuntu:14.10 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'rm /usr/sbin/policy-rc.d' + - 'rm /sbin/initctl; dpkg-divert --rename --remove /sbin/initctl' + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml new file mode 100644 index 0000000..caed722 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-docker.yml @@ -0,0 +1,15 @@ +HOSTS: + ubuntu-1504-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-15.04-amd64 + hypervisor : docker + image: ubuntu:15.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y wget' +CONFIG: + type: foss + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml new file mode 100644 index 0000000..22ef76c --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-15.04-x86_64-openstack.yml @@ -0,0 +1,14 @@ +HOSTS: + ubuntu-1504-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-15.04-amd64 + hypervisor : openstack + flavor: m1.small + image: ubuntu-1504-latest + user: ubuntu +CONFIG: + type: foss + log_level: debug + openstack_network: default diff --git a/spec/acceptance/nodesets/ubuntu-15.04.yml b/spec/acceptance/nodesets/ubuntu-15.04.yml new file mode 100644 index 0000000..329f331 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-15.04.yml @@ -0,0 +1,16 @@ +HOSTS: + ubuntu-1504-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-15.04-amd64 + hypervisor : docker + image: ubuntu:15.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-15.10.yml b/spec/acceptance/nodesets/ubuntu-15.10.yml new file mode 100644 index 0000000..487795a --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-15.10.yml @@ -0,0 +1,16 @@ +HOSTS: + ubuntu-1510-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-15.10-amd64 + hypervisor : docker + image: ubuntu:15.10 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/acceptance/nodesets/ubuntu-16.04.yml b/spec/acceptance/nodesets/ubuntu-16.04.yml new file mode 100644 index 0000000..6c32b96 --- /dev/null +++ b/spec/acceptance/nodesets/ubuntu-16.04.yml @@ -0,0 +1,16 @@ +HOSTS: + ubuntu-1604-x64: + default_apply_opts: + order: random + strict_variables: + platform: ubuntu-16.04-amd64 + hypervisor : docker + image: ubuntu:16.04 + docker_preserve_image: true + docker_cmd: '["/sbin/init"]' + docker_image_commands: + - 'apt-get install -y net-tools wget' + - 'locale-gen en_US.UTF-8' +CONFIG: + type: aio + log_level: debug diff --git a/spec/classes/augeas_spec.rb b/spec/classes/augeas_spec.rb index ab4241f..16f76f4 100644 --- a/spec/classes/augeas_spec.rb +++ b/spec/classes/augeas_spec.rb @@ -10,10 +10,12 @@ describe 'augeas' do end it 'should fail' do - expect { is_expected.to contain_package('ruby-augeas') }.to raise_error(Puppet::Error, /Unsupported OS family/) + expect { is_expected.to compile }.to raise_error(/Unsupported OS family/) end end + lens_dir = Puppet.version < '4.0.0' ? '/usr/share/augeas/lenses' : '/opt/puppetlabs/puppet/share/augeas/lenses' + on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) do @@ -21,53 +23,65 @@ describe 'augeas' do end context 'without params' do - case facts[:osfamily] - when 'Debian' - it { is_expected.to contain_package('libaugeas0').with( - :ensure => 'present' - ) } - it { is_expected.to contain_package('augeas-tools').with( - :ensure => 'present' - ) } - it { is_expected.to contain_package('augeas-lenses').with( - :ensure => 'present' - ) } - case facts[:lsbdistcodename] - when 'squeeze', 'lucid', 'precise' - it { is_expected.to contain_package('ruby-augeas').with( - :ensure => 'present', - :name => 'libaugeas-ruby1.8' + if Puppet.version < '4.0.0' + case facts[:osfamily] + when 'Debian' + it { is_expected.to contain_package('libaugeas0').with( + :ensure => 'present' + ) } + it { is_expected.to contain_package('augeas-tools').with( + :ensure => 'present' + ) } + it { is_expected.to contain_package('augeas-lenses').with( + :ensure => 'present' + ) } + case facts[:lsbdistcodename] + when 'squeeze', 'lucid', 'precise' + let(:facts) do + super().merge({ + :rubyversion => '1.8.7', + }) + end + it { is_expected.to contain_package('ruby-augeas').with( + :ensure => 'present', + :name => 'libaugeas-ruby1.8' + ) } + else + let(:facts) do + super().merge({ + :rubyversion => '1.9.3', + }) + end + it { is_expected.to contain_package('ruby-augeas').with( + :ensure => 'present', + :name => 'libaugeas-ruby1.9.1' + ) } + end + when 'RedHat' + it { is_expected.to contain_package('augeas').with( + :ensure => 'present' + ) } + it { is_expected.to contain_package('augeas-libs').with( + :ensure => 'present' ) } - else it { is_expected.to contain_package('ruby-augeas').with( :ensure => 'present', - :name => 'libaugeas-ruby1.9.1' + :name => 'ruby-augeas' ) } end - when 'RedHat' - it { is_expected.to contain_package('augeas').with( - :ensure => 'present' - ) } - it { is_expected.to contain_package('augeas-libs').with( - :ensure => 'present' - ) } - it { is_expected.to contain_package('ruby-augeas').with( - :ensure => 'present', - :name => 'ruby-augeas' - ) } end - it { is_expected.to contain_file('/usr/share/augeas/lenses').with( + it { is_expected.to contain_file(lens_dir).with( :ensure => 'directory', :purge => 'true', :force => 'true', :recurse => 'true', :recurselimit => 1 ) } - it { is_expected.to contain_file('/usr/share/augeas/lenses/dist').with( + it { is_expected.to contain_file("#{lens_dir}/dist").with( :ensure => 'directory', :purge => 'false' ) } - it { is_expected.to contain_file('/usr/share/augeas/lenses/tests').with( + it { is_expected.to contain_file("#{lens_dir}/tests").with( :ensure => 'directory', :purge => 'true', :force => 'true' @@ -82,42 +96,53 @@ describe 'augeas' do } end - case facts[:osfamily] - when 'Debian' - it { is_expected.to contain_package('libaugeas0').with( - :ensure => '1.2.3' - ) } - it { is_expected.to contain_package('augeas-tools').with( - :ensure => '1.2.3' - ) } - it { is_expected.to contain_package('augeas-lenses').with( - :ensure => '1.2.3' - ) } - case facts[:lsbdistcodename] - when 'squeeze', 'lucid', 'precise' - it { is_expected.to contain_package('ruby-augeas').with( - :ensure => '3.2.1', - :name => 'libaugeas-ruby1.8' + if Puppet.version < '4.0.0' + case facts[:osfamily] + when 'Debian' + it { is_expected.to contain_package('libaugeas0').with( + :ensure => '1.2.3' + ) } + it { is_expected.to contain_package('augeas-tools').with( + :ensure => '1.2.3' + ) } + it { is_expected.to contain_package('augeas-lenses').with( + :ensure => '1.2.3' + ) } + case facts[:lsbdistcodename] + when 'squeeze', 'lucid', 'precise' + let(:facts) do + super().merge({ + :rubyversion => '1.8.7', + }) + end + it { is_expected.to contain_package('ruby-augeas').with( + :ensure => '3.2.1', + :name => 'libaugeas-ruby1.8' + ) } + else + let(:facts) do + super().merge({ + :rubyversion => '1.9.3', + }) + end + it { is_expected.to contain_package('ruby-augeas').with( + :ensure => '3.2.1', + :name => 'libaugeas-ruby1.9.1' + ) } + end + when 'RedHat' + it { is_expected.to contain_package('augeas').with( + :ensure => '1.2.3' + ) } + it { is_expected.to contain_package('augeas-libs').with( + :ensure => '1.2.3' ) } - else it { is_expected.to contain_package('ruby-augeas').with( :ensure => '3.2.1', - :name => 'libaugeas-ruby1.9.1' + :name => 'ruby-augeas' ) } end - when 'RedHat' - it { is_expected.to contain_package('augeas').with( - :ensure => '1.2.3' - ) } - it { is_expected.to contain_package('augeas-libs').with( - :ensure => '1.2.3' - ) } - it { is_expected.to contain_package('ruby-augeas').with( - :ensure => '3.2.1', - :name => 'ruby-augeas' - ) } end - end context 'with a non standard lens_dir' do @@ -144,6 +169,38 @@ describe 'augeas' do :force => 'true' ).without(:recurse) } end + + context 'with Puppet Enterprise' do + let (:facts) do + facts.merge({ + :is_pe => true, + }) + end + + if Puppet::Util::Package.versioncmp(Puppet.version, '4.0.0') >= 0 + # the enterprise lens dir is the same in 4 + pe_lens_dir = lens_dir + else + pe_lens_dir = '/opt/puppet/share/augeas/lenses' + end + + it { is_expected.to contain_file(pe_lens_dir).with( + :ensure => 'directory', + :force => 'true', + :recurse => 'true', + :recurselimit => 1 + ) } + it { is_expected.to contain_file("#{pe_lens_dir}/dist").with( + :ensure => 'directory', + :purge => 'false' + ) } + it { is_expected.to contain_file("#{pe_lens_dir}/tests").with( + :ensure => 'directory', + :force => 'true', + :purge => 'true' + ).without(:recurse) } + end + end end end diff --git a/spec/defines/augeas_lens_spec.rb b/spec/defines/augeas_lens_spec.rb index 7feeefb..0fa1358 100644 --- a/spec/defines/augeas_lens_spec.rb +++ b/spec/defines/augeas_lens_spec.rb @@ -3,41 +3,20 @@ require 'spec_helper' describe 'augeas::lens' do let (:title) { 'foo' } - context 'when not declaring augeas class first' do - let (:params) do - { - :lens_source => '/tmp/foo.aug', - } - end - - it 'should error' do - expect { - is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') - }.to raise_error(Puppet::Error, /You must declare the augeas class/) - end - end + lens_dir = Puppet.version < '4.0.0' ? '/usr/share/augeas/lenses' : '/opt/puppetlabs/puppet/share/augeas/lenses' context 'when declaring augeas class first' do - on_supported_os.each do |os, facts| context "on #{os}" do let(:facts) do - facts.merge({ - :augeasversion => :undef, - }) + facts end context 'With standard augeas version' do - let(:pre_condition) do - "class { '::augeas': }" - end - context 'when no lens_source is passed' do it 'should error' do - expect { - is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') - }.to raise_error(Puppet::Error, /Must pass lens_source/) + expect { is_expected.to compile }.to raise_error(/You must set either \$lens_source or \$lens_content/) end end @@ -48,9 +27,9 @@ describe 'augeas::lens' do } end - it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_file("#{lens_dir}/foo.aug") } it { is_expected.to contain_exec('Typecheck lens foo') } - it { is_expected.not_to contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } + it { is_expected.not_to contain_file("#{lens_dir}/tests/test_foo.aug") } it { is_expected.not_to contain_exec('Test lens foo') } end @@ -62,9 +41,9 @@ describe 'augeas::lens' do } end - it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_file("#{lens_dir}/foo.aug") } + it { is_expected.to contain_file("#{lens_dir}/tests/test_foo.aug") } it { is_expected.to contain_exec('Typecheck lens foo') } - it { is_expected.to contain_file('/usr/share/augeas/lenses/tests/test_foo.aug') } it { is_expected.to contain_exec('Test lens foo') } end end @@ -77,11 +56,13 @@ describe 'augeas::lens' do } end - let(:pre_condition) do - "class { '::augeas': version => '1.0.0' }" + let(:facts) do + super().merge({ + :augeasversion => '1.0.0', + }) end - it { is_expected.to contain_file('/usr/share/augeas/lenses/foo.aug') } + it { is_expected.to contain_file("#{lens_dir}/foo.aug") } it { is_expected.to contain_exec('Typecheck lens foo') } end @@ -93,16 +74,16 @@ describe 'augeas::lens' do } end - let(:pre_condition) do - "class { '::augeas': version => '1.3.0' }" + let(:facts) do + super().merge({ + :augeasversion => '1.3.0', + }) end it do - pending "undefined method `negative_failure_message'" - is_expected.not_to contain_file('/usr/share/augeas/lenses/foo.aug') + is_expected.not_to contain_file("#{lens_dir}/foo.aug") end it do - pending "undefined method `negative_failure_message'" is_expected.not_to contain_exec('Typecheck lens foo') end end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 86cc740..94d30d5 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -11,7 +11,7 @@ RSpec.configure do |c| @old_env = {} ENV.each_key {|k| @old_env[k] = ENV[k]} - Puppet.settings[:strict_variables]=true if Gem::Version.new(Puppet::PUPPETVERSION) >= Gem::Version.new('3.5') + c.strict_variables = Gem::Version.new(Puppet.version) >= Gem::Version.new('3.5') Puppet.features.stubs(:root?).returns(true) end @@ -35,7 +35,7 @@ Puppet[:modulepath] = File.join(dir, 'fixtures', 'modules') # ticket https://tickets.puppetlabs.com/browse/MODULES-823 # ver = Gem::Version.new(Puppet.version.split('-').first) -if Gem::Requirement.new("~> 2.7.20") =~ ver || Gem::Requirement.new("~> 3.0.0") =~ ver || Gem::Requirement.new("~> 3.5") =~ ver +if Gem::Requirement.new("~> 2.7.20") =~ ver || Gem::Requirement.new("~> 3.0.0") =~ ver || Gem::Requirement.new("~> 3.5") =~ ver || Gem::Requirement.new("~> 4.0") puts "augeasproviders: setting Puppet[:libdir] to work around broken type autoloading" # libdir is only a single dir, so it can only workaround loading of one external module Puppet[:libdir] = "#{Puppet[:modulepath]}/augeasproviders_core/lib" |