From f91f10c2800edfc1b59fd731a6b6f82a47f74fcc Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 20 Mar 2020 23:46:45 +0000 Subject: [PATCH] test(neon): add pillar and tests for `3000` --- .../v201902-py3/controls/pkgs_spec.rb | 2 +- .../v3000-py3/controls/pkgs_spec.rb | 32 +++++++++++++++++++ .../v3000-py3/controls/service_spec.rb | 15 +++++++++ test/salt/pillar/v3000-py3.sls | 6 ++++ 4 files changed, 54 insertions(+), 1 deletion(-) create mode 100644 test/integration/v3000-py3/controls/pkgs_spec.rb create mode 100644 test/integration/v3000-py3/controls/service_spec.rb create mode 100644 test/salt/pillar/v3000-py3.sls diff --git a/test/integration/v201902-py3/controls/pkgs_spec.rb b/test/integration/v201902-py3/controls/pkgs_spec.rb index 42be5f2..d3cc963 100644 --- a/test/integration/v201902-py3/controls/pkgs_spec.rb +++ b/test/integration/v201902-py3/controls/pkgs_spec.rb @@ -12,7 +12,7 @@ version = when 'fedora' '2019.2.1rc0-3.fc31' when 'suse' - '2019.2.0-lp151.5.12.1' + '2019.2.0-lp151.28.1' when 'debian' '2019.2.3+ds-1' end diff --git a/test/integration/v3000-py3/controls/pkgs_spec.rb b/test/integration/v3000-py3/controls/pkgs_spec.rb new file mode 100644 index 0000000..7f95373 --- /dev/null +++ b/test/integration/v3000-py3/controls/pkgs_spec.rb @@ -0,0 +1,32 @@ +# frozen_string_literal: true + +version = + case platform[:family] + when 'redhat' + case platform[:name] + when 'amazon' + '3000-1.amzn2' + when 'centos' + '3000-1.el8' + end + when 'fedora' + '3000-5.fc31' + when 'suse' + '3000-lp151.28.1' + when 'debian' + '3000+ds-1' + end + +control 'salt packages' do + title 'should be installed' + + %w[ + salt-master + salt-minion + ].each do |p| + describe package(p) do + it { should be_installed } + its('version') { should eq version } + end + end +end diff --git a/test/integration/v3000-py3/controls/service_spec.rb b/test/integration/v3000-py3/controls/service_spec.rb new file mode 100644 index 0000000..27f8ae5 --- /dev/null +++ b/test/integration/v3000-py3/controls/service_spec.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +control 'salt services' do + title 'should be running' + + %w[ + salt-master + salt-minion + ].each do |p| + describe service(p) do + it { should be_enabled } + it { should be_running } + end + end +end diff --git a/test/salt/pillar/v3000-py3.sls b/test/salt/pillar/v3000-py3.sls new file mode 100644 index 0000000..97daba2 --- /dev/null +++ b/test/salt/pillar/v3000-py3.sls @@ -0,0 +1,6 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +salt: + release: '3000' + py_ver: 'py3'