-
Notifications
You must be signed in to change notification settings - Fork 69
add remotes in constructor #359
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -469,8 +469,6 @@ def test_remotes(self): | |
reference="lib/1.0@lasote/mychannel", | ||
ci_manager=self.ci_manager) | ||
|
||
builder.add({}, {}, {}, {}) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why this? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This tests if remotes are added. Currently, remotes are added when the jobs are being run. With this change remotes are added before that, so there's no point in adding any jobs. |
||
builder.run_builds() | ||
self.assertEquals(self.conan_api.calls[1].args[1], "url1") | ||
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1) | ||
self.assertEquals(self.conan_api.calls[3].args[1], "url2") | ||
|
@@ -485,8 +483,6 @@ def test_remotes(self): | |
reference="lib/1.0@lasote/mychannel", | ||
ci_manager=self.ci_manager) | ||
|
||
builder.add({}, {}, {}, {}) | ||
builder.run_builds() | ||
self.assertEquals(self.conan_api.calls[1].args[1], "myurl1") | ||
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1) | ||
|
||
|
@@ -502,8 +498,6 @@ def test_remotes(self): | |
reference="lib/1.0@lasote/mychannel", | ||
ci_manager=self.ci_manager) | ||
|
||
builder.add({}, {}, {}, {}) | ||
builder.run_builds() | ||
self.assertEquals(self.conan_api.calls[1].args[0], "my_cool_name1") | ||
self.assertEquals(self.conan_api.calls[1].args[1], "u1") | ||
self.assertEquals(self.conan_api.calls[1].kwargs["insert"], -1) | ||
|
@@ -710,7 +704,7 @@ def test_check_credentials(self): | |
|
||
# When activated, check credentials before to create the profiles | ||
self.assertEqual(self.conan_api.calls[2].name, 'authenticate') | ||
self.assertEqual(self.conan_api.calls[5].name, 'create_profile') | ||
self.assertEqual(self.conan_api.calls[3].name, 'create_profile') | ||
|
||
self.conan_api = MockConanAPI() | ||
# If we skip the credentials check, the login will be performed just before the upload | ||
|
@@ -725,7 +719,7 @@ def test_check_credentials(self): | |
ci_manager=self.ci_manager) | ||
builder.add_common_builds() | ||
builder.run() | ||
self.assertNotEqual(self.conan_api.calls[0].name, 'authenticate') | ||
self.assertNotEqual(self.conan_api.calls[2].name, 'authenticate') | ||
|
||
# No upload, no authenticate | ||
self.conan_api = MockConanAPI() | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is going to break something when running docker. Have you tried?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, I haven't. Also, currently I am basically in the middle of nowhere, so I can't test it now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed, it will. I see these ways to fix this:
RemotesManager
, which is set and checked inadd_remotes_to_conan
.RemotesManager
's constructor.cpt.run_in_docker:run
.What is the most desired approach? Personally, I like approach 2 the most.