Shared secret registration moved to an admin API#453
Merged
Conversation
Contributor
Author
|
matrixbot: retest this please |
41a2df7 to
f2287b5
Compare
Contributor
Author
|
matrixbot: retest this please |
richvdh
reviewed
Jul 18, 2018
Member
There was a problem hiding this comment.
as a general principle, I'm not sure we should be testing /admin APIs from sytest, because they are by definition synapse-specific, but this looks great.
lgtm other than you failing to intuit leo's whitespace policy.
and congratulations on successfully hacking on sytest.
tests/10apidoc/01register.pl
Outdated
| $http->do_request_json( | ||
| method => "GET", | ||
| uri => "/r0/admin/register", | ||
| )->then(sub{ |
Member
There was a problem hiding this comment.
sorry, the whitespace conventions for sytest are... unusual.
this should have a space inside the parens:
)->then( sub {
tests/10apidoc/01register.pl
Outdated
| my ( $nonce ) = @_; | ||
|
|
||
| my $mac = hmac_sha1_hex( | ||
| join("\0", $nonce->{nonce}, $uid, $password, $is_admin ? "admin" : "notadmin" ), |
Member
There was a problem hiding this comment.
this needs indenting and space inside the parens
tests/10apidoc/01register.pl
Outdated
|
|
||
| $http->do_request_json( | ||
| return $http->do_request_json( | ||
| method => "POST", |
lib/SyTest/HTTPClient.pm
Outdated
| $message =~ s/\r?\n?$//; # because HTTP::Response doesn't do this | ||
|
|
||
| return Future->fail( "HTTP Request failed (${\$response->code} $message)", | ||
| return Future->fail( "HTTP Request failed (${\$response->code} $message $uri)", |
Member
There was a problem hiding this comment.
space inside these parens too please
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.