Skip to content
This repository was archived by the owner on Jan 15, 2025. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions AUTHORS
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 4 additions & 5 deletions pulp_puppet_plugins/test/unit/test_install_distributor.py
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
Expand Down Expand Up @@ -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')))
Expand Down Expand Up @@ -602,7 +602,6 @@ def test_real_dir(self, mock_rmtree):


class TestCreateTemporaryDestinationDirectory(unittest.TestCase):

def setUp(self):
self.tmp_dir = tempfile.mkdtemp()

Expand Down