diff options
author | Vincent Petry <pvince81@owncloud.com> | 2017-03-20 12:41:56 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2017-03-24 12:40:14 -0600 |
commit | c54091d43bc94728970479ea745c993f99f9b056 (patch) | |
tree | a250b59f4b0cb54c857271d024d3692cff3a2bcd /build/integration/features/bootstrap/WebDav.php | |
parent | 2cd79a8d3d6c160b9458327b1429eed9ec1a25a2 (diff) | |
download | nextcloud-server-c54091d43bc94728970479ea745c993f99f9b056.tar.gz nextcloud-server-c54091d43bc94728970479ea745c993f99f9b056.zip |
Use authType BASIC for Sabre client in integration tests
This helps massively reduce the numerous useless 401 exceptions that
appears in the test log. These appear only because Sabre first connects
without any auth type to receive the challenge and then sends the
authentication data.
With this change it will directly use basic auth.
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'build/integration/features/bootstrap/WebDav.php')
-rw-r--r-- | build/integration/features/bootstrap/WebDav.php | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/build/integration/features/bootstrap/WebDav.php b/build/integration/features/bootstrap/WebDav.php index 0a75ff96732..3a018a2d0fa 100644 --- a/build/integration/features/bootstrap/WebDav.php +++ b/build/integration/features/bootstrap/WebDav.php @@ -170,7 +170,6 @@ trait WebDav { public function downloadPublicFileWithRange($range){ $token = $this->lastShareData->data->token; $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav"; - $headers['Range'] = $range; $client = new GClient(); $options = []; @@ -189,7 +188,6 @@ trait WebDav { public function downloadPublicFileInsideAFolderWithRange($path, $range){ $token = $this->lastShareData->data->token; $fullUrl = substr($this->baseUrl, 0, -4) . "public.php/webdav" . "$path"; - $headers['Range'] = $range; $client = new GClient(); $options = []; @@ -437,16 +435,17 @@ trait WebDav { public function getSabreClient($user) { $fullUrl = substr($this->baseUrl, 0, -4); - $settings = array( + $settings = [ 'baseUri' => $fullUrl, 'userName' => $user, - ); + ]; if ($user === 'admin') { $settings['password'] = $this->adminUser[1]; } else { $settings['password'] = $this->regularUser; } + $settings['authType'] = SClient::AUTH_BASIC; return new SClient($settings); } @@ -634,15 +633,17 @@ trait WebDav { /*Set the elements of a proppatch, $folderDepth requires 1 to see elements without children*/ public function changeFavStateOfAnElement($user, $path, $favOrUnfav, $folderDepth, $properties = null){ $fullUrl = substr($this->baseUrl, 0, -4); - $settings = array( + $settings = [ 'baseUri' => $fullUrl, 'userName' => $user, - ); + ]; if ($user === 'admin') { $settings['password'] = $this->adminUser[1]; } else { $settings['password'] = $this->regularUser; } + $settings['authType'] = SClient::AUTH_BASIC; + $client = new SClient($settings); if (!$properties) { $properties = [ |