Move the login and logout methods to a client. #518

Merged
merged 1 commit into from May 27, 2016

Conversation

Projects
None yet
2 participants
Member

elopio commented May 25, 2016

No description provided.

Member

elopio commented May 25, 2016

This is the first split of the macaroons branch. It just moves the simple login and logout methods to a client object. Requires #511.

Member

elopio commented May 25, 2016

retest this please

Collaborator

sergiusens commented May 26, 2016

@elopio just a reminder to update the branch 😉

Member

elopio commented May 27, 2016

The unit tests are passing locally and on jenkins, but failing on travis. And travis refuses to show the output. I'm retrying...

Collaborator

sergiusens commented May 27, 2016

Oh, this is a case of cyclic dependencies. I had the same problem before. Travis uses python3.4 I believe and this is not handled vey well.

+ self.useFixture(fixture_setup.FakeStore())
+ self.client = storeapi.StoreClient()
+
+ def test_login_successful(self):
@sergiusens

sergiusens May 27, 2016

Collaborator

is there a fake server response where we use the correct password but otp is required? (just want to test the response)

@elopio

elopio May 27, 2016

Member

yes, look down:
test_failed_login_with_wrong_one_time_password

That's only in unit tests though. We could add one for integration, even hitting the staging test. I'm not sure if it adds value, but it's easy to do. File a bug if you want it, and assign it to me.

@sergiusens

sergiusens May 27, 2016

Collaborator

I thought an incorrect otp was different than a missing one which is required

@elopio

elopio May 27, 2016

Member

as far as I know, the answer is the same. Either an sso.ApiException or an sso.UnexpectedApiException. That is handled by the ssoclient. From our side, we just need to make sure that the success field is False.
Unless you mean something different and I misunderstood your comment.

Collaborator

sergiusens commented May 27, 2016

👍

Member

elopio commented May 27, 2016

restest this please

@sergiusens sergiusens merged commit 927936b into snapcore:master May 27, 2016

2 of 4 checks passed

continuous-integration/travis-ci/pr The Travis CI build failed
Details
coverage/coveralls Coverage pending from Coveralls.io
Details
Examples tests Success
Details
autopkgtest Success
Details

josepht added a commit to josepht/snapcraft that referenced this pull request May 31, 2016

@elopio elopio deleted the elopio:macaroons1 branch Jun 21, 2016

kalikiana pushed a commit to kalikiana/snapcraft that referenced this pull request Apr 6, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment