Skip to content

Commit

Permalink
Remove Baikal 0.9.1, there are open issues in the docker image
Browse files Browse the repository at this point in the history
  • Loading branch information
mstilkerich committed Jan 14, 2022
1 parent 47ece3e commit 4504a61
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@ jobs:
strategy:
fail-fast: false
matrix:
baikal-version: ['experimental', 0.8.0', '0.7.2']
baikal-version: ['0.8.0', '0.7.2']
runs-on: ubuntu-20.04

env:
Expand Down
2 changes: 2 additions & 0 deletions tests/interop/AccountData.php.dist
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ final class AccountData
"password" => "ncadmPassw0rd",
"discoveryUri" => "http://localhost:8080/remote.php/dav/",
"syncAllowExtraChanges" => false,
// Nextcloud 21 (oldest still supported) uses Sabre 4.1.4 which still contains the reported issues, so we
// need to exclude some tests until 21 is EOL
"featureSet" => TestInfrastructureSrv::SRVFEATS_SABRE,
],
"Radicale" => [
Expand Down
25 changes: 9 additions & 16 deletions tests/interop/TestInfrastructureSrv.php
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,8 @@ public static function makeCredentials(array $cfg): array
&& isset($cfg['clientId'])
&& isset($cfg['clientSecret'])
) {
// Fetch an access token using the available refresh token
$client = new \GuzzleHttp\Client();
$postData = [
'grant_type' => 'refresh_token',
'refresh_token' => self::replaceEnvVar($cfg['refreshtoken']),
Expand All @@ -206,22 +208,13 @@ public static function makeCredentials(array $cfg): array
$postData['scope'] = $cfg['oAuthScopes'];
}

$options = array(
'http' => array(
'header' => "Content-type: application/x-www-form-urlencoded\r\n",
'method' => 'POST',
'content' => http_build_query($postData)
)
);
$context = stream_context_create($options);
$result = file_get_contents($cfg['tokenUri'], false, $context);

if (is_string($result)) {
/** @var array | false */
$json = json_decode($result, true);
if (isset($json["access_token"]) && is_string($json["access_token"])) {
$cred["bearertoken"] = $json["access_token"];
}
$response = $client->request('POST', $cfg['tokenUri'], ['form_params' => $postData]);
$body = (string) $response->getBody();

/** @var array | false */
$json = json_decode($body, true);
if (isset($json["access_token"]) && is_string($json["access_token"])) {
$cred["bearertoken"] = $json["access_token"];
}
}

Expand Down

0 comments on commit 4504a61

Please sign in to comment.