Skip to content

Commit

Permalink
Merge pull request #481 from citrus-it/merge
Browse files Browse the repository at this point in the history
36620736 TestPkgrepoMultiRepo.test_01_diff failing post 36247279
  • Loading branch information
hadfl authored Jun 4, 2024
2 parents 34bc55c + e29c2ab commit 065f5fe
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 12 deletions.
6 changes: 3 additions & 3 deletions README.sync
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
The pkg5 components have been updated to the latest upstream solaris-ips
as of:

commit ea98f7c05e3fc1c8501a80f331128f3dd26ced31
commit 616fce8ad21fc03eaa77ba38508c66c356f03d65
Author: Jakub Kulik <[email protected]>
Date: Tue May 28 04:40:57 2024 -0700
Date: Wed May 29 05:44:20 2024 -0700

36615968 move man related code from setup.py to its own Makefile
36620736 TestPkgrepoMultiRepo.test_01_diff failing post 36247279

-----------------------------------------------------------------------------

24 changes: 15 additions & 9 deletions src/tests/cli/t_pkgrepo.py
Original file line number Diff line number Diff line change
Expand Up @@ -4259,25 +4259,31 @@ def test_01_diff(self):
)
self.assertTrue(not self.output)

# Test that clone removes all the packages if the source catalog
# does not exist.
# Test that clone won't continue if the source catalog does not
# exist or is empty (bug 36247279).
# Source and destination have the same publishers.
self.pkgrepo("remove -s {0} -p test1 '*'".format(self.rdir4))
# Delete the catlog
repo = self.get_repo(self.rdir4)
repo.get_catalog("test1").destroy()
self.pkgrecv(self.rdir4, "--clone -d {0} -p test1".format(self.rdir3))
expected = "The source catalog 'test1' is empty"
self.assertTrue(expected in self.output, self.output)
self.assertRaises(
pkg5unittest.UnexpectedExitCodeException,
self.pkgrecv,
self.rdir4,
f"--clone -d {self.rdir3} -p test1",
)

# Mention all the publishers while cloning
self.pkgrepo("remove -s {0} '*'".format(self.rdir2))
repo = self.get_repo(self.rdir2)
# Delete the catalog
repo = self.get_repo(self.rdir2)
repo.get_catalog("test2").destroy()
self.pkgrecv(self.rdir2, "--clone -d {0} -p '*'".format(self.rdir1))
expected = "The source catalog 'test2' is empty"
self.assertTrue(expected in self.output, self.output)
self.assertRaises(
pkg5unittest.UnexpectedExitCodeException,
self.pkgrecv,
self.rdir2,
f"--clone -d {self.rdir1} -p '*",
)


class TestPkgrepoHTTPS(pkg5unittest.HTTPSTestClass):
Expand Down

0 comments on commit 065f5fe

Please sign in to comment.