From c228029879f36ee5aaa5f3cd3d3684ede29808bb Mon Sep 17 00:00:00 2001 From: Imran Iqbal Date: Fri, 1 May 2020 08:32:39 +0100 Subject: [PATCH] test: add tests for `v3000-py2` --- .../v3000-py2/controls/pkgs_spec.rb | 21 +++++++++++++++++++ .../v3000-py2/controls/service_spec.rb | 16 ++++++++++++++ test/salt/pillar/v3000-py2.sls | 5 +++++ 3 files changed, 42 insertions(+) create mode 100644 test/integration/v3000-py2/controls/pkgs_spec.rb create mode 100644 test/integration/v3000-py2/controls/service_spec.rb create mode 100644 test/salt/pillar/v3000-py2.sls diff --git a/test/integration/v3000-py2/controls/pkgs_spec.rb b/test/integration/v3000-py2/controls/pkgs_spec.rb new file mode 100644 index 0000000..df3ed64 --- /dev/null +++ b/test/integration/v3000-py2/controls/pkgs_spec.rb @@ -0,0 +1,21 @@ +# frozen_string_literal: true + +version = + case platform[:family] + when 'debian' + '3000.2+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-py2/controls/service_spec.rb b/test/integration/v3000-py2/controls/service_spec.rb new file mode 100644 index 0000000..9d99883 --- /dev/null +++ b/test/integration/v3000-py2/controls/service_spec.rb @@ -0,0 +1,16 @@ +# 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_installed } + it { should be_enabled } + it { should be_running } + end + end +end diff --git a/test/salt/pillar/v3000-py2.sls b/test/salt/pillar/v3000-py2.sls new file mode 100644 index 0000000..7d4f917 --- /dev/null +++ b/test/salt/pillar/v3000-py2.sls @@ -0,0 +1,5 @@ +# -*- coding: utf-8 -*- +# vim: ft=yaml +--- +salt: + release: '3000'