Skip to content
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

Fix upload return codes #4857

Merged
merged 2 commits into from Mar 28, 2019

Conversation

Projects
None yet
2 participants
@lasote
Copy link
Contributor

commented Mar 28, 2019

Changelog: Bugfix: Fixed authentication management when a server returns 401 uploading a file.
Docs: omit

@lasote lasote added this to the 1.14 milestone Mar 28, 2019

@ghost ghost assigned lasote Mar 28, 2019

@ghost ghost added the stage: review label Mar 28, 2019

with six.assertRaisesRegex(self, AuthenticationException, "tururu"):
uploader.upload("fake_url", f)

def test_403_raises_unauthoirzed_exception_if_no_token(self):

This comment has been minimized.

Copy link
@lasote

lasote Mar 28, 2019

Author Contributor

this manages the (my point of view) weird artifactory behavior while uploading


class UploaderUnitTest(unittest.TestCase):

def test_401_raises_unauthoirzed_exception(self):

This comment has been minimized.

Copy link
@lasote

lasote Mar 28, 2019

Author Contributor

This test a regular behavior of a 401 returned when trying to upload (bintray)

with six.assertRaisesRegex(self, AuthenticationException, "tururu"):
uploader.upload("fake_url", f, auth=auth)

def test_403_raises_forbidden_exception_if_token(self):

This comment has been minimized.

Copy link
@lasote

lasote Mar 28, 2019

Author Contributor

This test a classic wrong token while uploading

@lasote lasote merged commit 1386465 into conan-io:develop Mar 28, 2019

2 checks passed

continuous-integration/jenkins/pr-head This commit looks good
Details
license/cla Contributor License Agreement is signed.
Details

@ghost ghost removed the stage: review label Mar 28, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.