From 1e2e810f3f7cb6a163a0229ac37037e8c6744d72 Mon Sep 17 00:00:00 2001 From: Dominic Schlegel Date: Thu, 8 Mar 2018 12:13:38 +0100 Subject: Make salt minion module work on FreeBSD. Previously the module was not working under FreeBSD due to a different package name and some different paths. The module now has OS specific default values which can even be customized via corresponding cloud config variables. LP: #1721503 --- tests/cloud_tests/testcases/modules/salt_minion.py | 5 +++++ tests/cloud_tests/testcases/modules/salt_minion.yaml | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'tests/cloud_tests') diff --git a/tests/cloud_tests/testcases/modules/salt_minion.py b/tests/cloud_tests/testcases/modules/salt_minion.py index f13b48a0..70917a4c 100644 --- a/tests/cloud_tests/testcases/modules/salt_minion.py +++ b/tests/cloud_tests/testcases/modules/salt_minion.py @@ -31,4 +31,9 @@ class Test(base.CloudTestCase): out = self.get_data_file('grains') self.assertIn('role: web', out) + def test_minion_installed(self): + """Test if the salt-minion package is installed""" + out = self.get_data_file('minion_installed') + self.assertEqual(1, int(out)) + # vi: ts=4 expandtab diff --git a/tests/cloud_tests/testcases/modules/salt_minion.yaml b/tests/cloud_tests/testcases/modules/salt_minion.yaml index ab0e05bb..f20b9765 100644 --- a/tests/cloud_tests/testcases/modules/salt_minion.yaml +++ b/tests/cloud_tests/testcases/modules/salt_minion.yaml @@ -3,7 +3,7 @@ # # 2016-11-17: Currently takes >60 seconds results in test failure # -enabled: False +enabled: True cloud_config: | #cloud-config salt_minion: @@ -35,5 +35,8 @@ collect_scripts: grains: | #!/bin/bash cat /etc/salt/grains + minion_installed: | + #!/bin/bash + dpkg -l | grep salt-minion | grep ii | wc -l # vi: ts=4 expandtab -- cgit v1.2.3