Skip to content

Commit

Permalink
conan-io#153 Fix unit test for upload recipe
Browse files Browse the repository at this point in the history
Signed-off-by: Uilian Ries <uilianries@gmail.com>
  • Loading branch information
uilianries committed Mar 14, 2019
1 parent 86389c8 commit 331beac
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions cpt/test/test_client/upload_checks_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,6 @@ def test_upload_when_tag_is_true(self):
self.assertIn("Uploading package 1/1: 5ab84d6acfe1f23c4fae0ab88f26e3a396351ac9 to 'default'", tc.out)

def test_upload_only_recipe(self):
""" When CONAN_UPLOAD_ONLY_RECIPE is TRUE, binary must not be uploaded.
"""
ts = TestServer(users={"user": "password"})
tc = TestClient(servers={"default": ts}, users={"default": [("user", "password")]})
tc.save({"conanfile.py": self.conanfile})
Expand All @@ -118,9 +116,9 @@ def test_upload_only_recipe(self):
mulitpackager.add({}, {"shared": False})
mulitpackager.run()

self.assertIn(" Uploading packages for 'lib/1.0@user/testing'", tc.out)
self.assertIn("Uploading lib/1.0@user/testing to remote", tc.out)
self.assertIn("Uploaded conan recipe 'lib/1.0@user/testing'", tc.out)
self.assertIn(" Uploading packages for 'lib/1.0@user/mychannel'", tc.out)
self.assertIn("Uploading lib/1.0@user/mychannel to remote", tc.out)
self.assertIn("Uploaded conan recipe 'lib/1.0@user/mychannel'", tc.out)
self.assertNotIn("Uploading package 1/2", tc.out)
self.assertNotIn("Uploading package 2/2", tc.out)

Expand All @@ -133,8 +131,8 @@ def test_upload_only_recipe(self):
mulitpackager.add({}, {"shared": False})
mulitpackager.run()

self.assertIn(" Uploading packages for 'lib/1.0@user/testing'", tc.out)
self.assertIn("Uploading lib/1.0@user/testing to remote", tc.out)
self.assertIn(" Uploading packages for 'lib/1.0@user/mychannel'", tc.out)
self.assertIn("Uploading lib/1.0@user/mychannel to remote", tc.out)
self.assertIn("Recipe is up to date, upload skipped", tc.out)
self.assertIn("Uploading package 1/2", tc.out)
self.assertIn("Uploading package 2/2", tc.out)

0 comments on commit 331beac

Please sign in to comment.