From 40255194b08db2292ef0ca6aee95ac28dee1408d Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Wed, 17 Jan 2018 21:35:41 -0700 Subject: [PATCH 1/2] fix fedora pkg test yum is no longer installed by default on fedora. apparently it has been removed from the base installs, and only dnf is available. Stop depending on the pkg manager, and just use bash. --- tests/integration/modules/pkg.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/integration/modules/pkg.py b/tests/integration/modules/pkg.py index fd7943f492..b24b32cb14 100644 --- a/tests/integration/modules/pkg.py +++ b/tests/integration/modules/pkg.py @@ -240,10 +240,10 @@ class PkgModuleTest(integration.ModuleCase, self.assertIn('bash-completion', keys) self.assertIn('dpkg', keys) elif os_family == 'RedHat': - ret = self.run_function(func, ['rpm', 'yum']) + ret = self.run_function(func, ['rpm', 'bash']) keys = ret.keys() self.assertIn('rpm', keys) - self.assertIn('yum', keys) + self.assertIn('bash', keys) elif os_family == 'SUSE': ret = self.run_function(func, ['less', 'zypper']) keys = ret.keys() From 5455d2dee6cd5bf501e68c4891ffa278647628d5 Mon Sep 17 00:00:00 2001 From: Daniel Wallace Date: Wed, 17 Jan 2018 22:41:06 -0700 Subject: [PATCH 2/2] fix centos 6 pip test flake8 is having problems installing on python2.6, switching to different module that still works easily on python 2.6 --- tests/integration/modules/pip.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/integration/modules/pip.py b/tests/integration/modules/pip.py index 403aa8b01d..01a3ef9637 100644 --- a/tests/integration/modules/pip.py +++ b/tests/integration/modules/pip.py @@ -47,7 +47,7 @@ class PipModuleTest(integration.ModuleCase): ''' return any(w in ret for w in ['URLError', 'Download error']) - def pip_successful_install(self, target, expect=('flake8', 'pep8',)): + def pip_successful_install(self, target, expect=('tox', 'pep8',)): ''' isolate regex for extracting `successful install` message from pip ''' @@ -102,7 +102,7 @@ class PipModuleTest(integration.ModuleCase): with salt.utils.fopen(req1_filename, 'w') as f: f.write('-r requirements1b.txt\n') with salt.utils.fopen(req1b_filename, 'w') as f: - f.write('flake8\n') + f.write('tox\n') with salt.utils.fopen(req2_filename, 'w') as f: f.write('-r requirements2b.txt\n') with salt.utils.fopen(req2b_filename, 'w') as f: @@ -140,7 +140,7 @@ class PipModuleTest(integration.ModuleCase): with salt.utils.fopen(req1_filename, 'w') as f: f.write('-r requirements1b.txt\n') with salt.utils.fopen(req1b_filename, 'w') as f: - f.write('flake8\n') + f.write('tox\n') with salt.utils.fopen(req2_filename, 'w') as f: f.write('-r requirements2b.txt\n') with salt.utils.fopen(req2b_filename, 'w') as f: @@ -173,7 +173,7 @@ class PipModuleTest(integration.ModuleCase): req2_filename = os.path.join(self.venv_dir, 'requirements2.txt') with salt.utils.fopen(req1_filename, 'w') as f: - f.write('flake8\n') + f.write('tox\n') with salt.utils.fopen(req2_filename, 'w') as f: f.write('pep8\n') @@ -210,7 +210,7 @@ class PipModuleTest(integration.ModuleCase): req2_filepath = os.path.join(req_cwd, req2_filename) with salt.utils.fopen(req1_filepath, 'w') as f: - f.write('flake8\n') + f.write('tox\n') with salt.utils.fopen(req2_filepath, 'w') as f: f.write('pep8\n')