1064 get user by login#1065
Conversation
|
Build succeeded (check pipeline). |
|
fixes #1065 |
Codecov Report
@@ Coverage Diff @@
## master #1065 +/- ##
============================================
- Coverage 83.12% 83.11% -0.01%
- Complexity 2597 2603 +6
============================================
Files 343 345 +2
Lines 6641 6658 +17
Branches 477 478 +1
============================================
+ Hits 5520 5534 +14
- Misses 925 927 +2
- Partials 196 197 +1
Continue to review full report at Codecov.
|
|
Build succeeded (check pipeline). |
|
Build succeeded (check pipeline). |
1 similar comment
|
Build succeeded (check pipeline). |
|
@liry not sure about AT, should I write something similar what is in IT? |
60b54b0 to
1edd31f
Compare
|
Build succeeded (check pipeline). |
1edd31f to
b987726
Compare
|
Build succeeded (check pipeline). |
b987726 to
0bb0bea
Compare
|
Build succeeded (check pipeline). |
|
@liry please any feedback? Thanks. |
There was a problem hiding this comment.
@liry not sure about AT, should I write something similar what is in IT?
@cipous I'm sorry for the delay, I somehow missed this comment.
In ATs, we usually verify the happy path of the service against real backend - i.e. I would add there similar test case to AccountServiceAT.getAccount. (We want to verify we haven't done a mistake in API mocks in IT's.)
We will also try to explain various test types better in the contributing guide: #1068 ;)
| notNull(email, "email"); | ||
| notNull(organizationName, "organizationName"); | ||
| try { | ||
| return restTemplate.getForObject(Account.ACCOUNT_BY_EMAIL_URI, Accounts.class, organizationName, email); |
There was a problem hiding this comment.
Here, we're trying to get exactly one account by specific email, right? So I would add check that exactly one account is in the response and then return only that one Account. (Throw if no user is returned.)
BTW, this resource is also able to list all domain accounts (w/o login filter), but such a service method can be added later.
There was a problem hiding this comment.
Ohh, I was thinking why it returns collection. ok will address your comments soon.
There was a problem hiding this comment.
I did not throw any error on more than one, as login should be unique.
Also could I use this PR to add constructor to Account with all values - like login?
public Account(final String login, final String email, final String password, final String firstName, final String lastName, final List<String> ipWhitelist, final List<String> authenticationModes) { this(login, email, password, password, firstName, lastName, ipWhitelist, authenticationModes, null); }
or should I create separate issue for this.
ALso please when do you expect release of both changes?
There was a problem hiding this comment.
@liry please ^ I would like to merge asap so hopefully there is release soon, thanks
There was a problem hiding this comment.
And what's the use case of such a constructor? If you're talking about some new service method, I would create separate issuer for that.
We can release new version for you right after this PR is merged ;)
There was a problem hiding this comment.
I have created separate PR https://github.com/gooddata/gooddata-java/pull/1071/files and issue.
It would be great, if you could release it together with these two changes. What we are aiming is to create user(get by login if does not exist) for given project, assign him some roles. We call it provisioning, with those 2 PR this should be possible with SDK only...
|
Build succeeded (check pipeline). |
|
And please squash your commits into one in the end because they are all about implementation of one service method. We will then merge it and release new version. |
|
Build succeeded (check pipeline). |
Co-authored-by: Libor Ryšavý <liry@users.noreply.github.com>
9026b52 to
6a55e1c
Compare
|
Build succeeded (check pipeline). |
|
Thanks for fixing javadoc, I accepted your suggestions. Is there something else? (please with release wait for https://github.com/gooddata/gooddata-java/pull/1071/files). Thank you! |
|
Build succeeded (gate pipeline).
|
fixes 1064
Its work in progress, please comment what tests are missing, not sure how to handle response in case of array of items.