chore: Adapt integration test to API change

Trying to create an auth token from an authtoken
 returns 403 now, not 503 (which is more correct)

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
pull/61322/head
Côme Chilliet 2 months ago
parent f7f9a47ceb
commit e1dd3da78a
No known key found for this signature in database
GPG Key ID: A3E2F658B28C760A
  1. 3
      build/integration/features/auth.feature
  2. 4
      build/integration/features/bootstrap/Auth.php

@ -104,7 +104,7 @@ Feature: auth
Then the HTTP status code should be "200"
When the CSRF token is extracted from the previous response
When a new unrestricted client token is added using restricted basic token auth
Then the HTTP status code should be "503"
Then the HTTP status code should be "403"
Scenario: Creating a restricted auth token with regular login should work
When a new restricted client token is added
@ -113,4 +113,3 @@ Feature: auth
Scenario: Creating an unrestricted auth token with regular login should work
When a new unrestricted client token is added
Then the HTTP status code should be "200"

@ -93,7 +93,9 @@ trait Auth {
try {
$this->response = $client->request('POST', $fullUrl, $options);
} catch (\GuzzleHttp\Exception\ServerException $e) {
} catch (ClientException $ex) {
$this->response = $ex->getResponse();
} catch (ServerException $e) {
$this->response = $e->getResponse();
}
return json_decode($this->response->getBody()->getContents());

Loading…
Cancel
Save