diff --git a/AUTHORS b/AUTHORS index f1fda461..fdc56e6e 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,6 +1,7 @@ This is an alphabetical (by last name) list of the authors of the Pulp Puppet project. If you submit a pull request to Pulp Puppet and your name is not on this list, please add yourself. +Ammar Ansari (mansari@redhat.com) Randy Barlow (rbarlow@redhat.com) Jeremy Cline (jcline@redhat.com) Jason L Connor (jason.connor@gmail.com) diff --git a/pulp_puppet_plugins/pulp_puppet/plugins/distributors/installdistributor.py b/pulp_puppet_plugins/pulp_puppet/plugins/distributors/installdistributor.py index 5898e4cb..6e4c000f 100644 --- a/pulp_puppet_plugins/pulp_puppet/plugins/distributors/installdistributor.py +++ b/pulp_puppet_plugins/pulp_puppet/plugins/distributors/installdistributor.py @@ -98,7 +98,7 @@ def validate_config(self, repo, config, config_conduit): path = config.get(constants.CONFIG_INSTALL_PATH) if not isinstance(path, basestring): # path not here, nothing else to validate - return True, None + return False, _('An install_path has to be specified for the puppet install distributor.') if not os.path.isabs(path): return False, _('install path is not absolute') return True, None diff --git a/pulp_puppet_plugins/test/unit/test_install_distributor.py b/pulp_puppet_plugins/test/unit/test_install_distributor.py index 68e47f23..76d3449a 100644 --- a/pulp_puppet_plugins/test/unit/test_install_distributor.py +++ b/pulp_puppet_plugins/test/unit/test_install_distributor.py @@ -95,7 +95,7 @@ def test_not_present(self): result, message = self.distributor.validate_config(self.repo, config, []) - self.assertTrue(result) + self.assertFalse(result) def test_relative_path(self): config = PluginCallConfiguration({}, {constants.CONFIG_INSTALL_PATH: 'a/b/c'}) @@ -422,20 +422,20 @@ def existing_files_saved(self): touch(existing_file) new_dir = os.path.join(self.source_dir, 'bar') os.makedirs(new_dir) - installdistributor.PuppetModuleInstallDistributor.\ + installdistributor.PuppetModuleInstallDistributor. \ _move_to_destination_directory(self.source_dir, self.destination_dir) self.assertTrue(os.path.exists(existing_file)) def test_source_dir_removed(self): - installdistributor.PuppetModuleInstallDistributor.\ + installdistributor.PuppetModuleInstallDistributor. \ _move_to_destination_directory(self.source_dir, self.destination_dir) self.assertFalse(os.path.exists(self.source_dir)) def test_move_dirs(self): new_dir = os.path.join(self.source_dir, 'bar') os.makedirs(new_dir) - installdistributor.PuppetModuleInstallDistributor.\ + installdistributor.PuppetModuleInstallDistributor. \ _move_to_destination_directory(self.source_dir, self.destination_dir) self.assertTrue(os.path.exists(os.path.join(self.destination_dir, 'bar'))) @@ -602,7 +602,6 @@ def test_real_dir(self, mock_rmtree): class TestCreateTemporaryDestinationDirectory(unittest.TestCase): - def setUp(self): self.tmp_dir = tempfile.mkdtemp()