Skip to content

Commit

Permalink
Merge pull request #40629 from roshanlc/remove-ocis-helper-class
Browse files Browse the repository at this point in the history
[tests-only][full-ci] Remove OcisHelper class and its references
  • Loading branch information
phil-davis authored Feb 10, 2023
2 parents 8629ed3 + 5568a4b commit 21002f0
Show file tree
Hide file tree
Showing 11 changed files with 131 additions and 738 deletions.
35 changes: 0 additions & 35 deletions tests/TestHelpers/HttpRequestHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,27 +42,6 @@
class HttpRequestHelper {
public const HTTP_TOO_EARLY = 425;

/**
* @var string
*/
private static $oCSelectorCookie = null;

/**
* @return string
*/
public static function getOCSelectorCookie(): string {
return self::$oCSelectorCookie;
}

/**
* @param string $oCSelectorCookie "owncloud-selector=oc10;path=/;"
*
* @return void
*/
public static function setOCSelectorCookie(string $oCSelectorCookie): void {
self::$oCSelectorCookie = $oCSelectorCookie;
}

/**
* Some systems-under-test do async post-processing of operations like upload,
* move etc. If a client does a request on the resource before the post-processing
Expand Down Expand Up @@ -349,20 +328,6 @@ public static function createRequest(
$headers['Content-Type'] = 'application/x-www-form-urlencoded';
}

if (OcisHelper::isTestingParallelDeployment()) {
// oCIS cannot handle '/apps/testing' endpoints
// so those requests must be redirected to oC10 server
// change server to oC10 if the request url has `/apps/testing`
if (strpos($url, "/apps/testing") !== false) {
$oCISServerUrl = \getenv('TEST_SERVER_URL');
$oC10ServerUrl = \getenv('TEST_OC10_URL');
$url = str_replace($oCISServerUrl, $oC10ServerUrl, $url);
} else {
// set 'owncloud-server' selector cookie for oCIS requests
$headers['Cookie'] = self::getOCSelectorCookie();
}
}

$request = new Request(
$method,
$url,
Expand Down
343 changes: 0 additions & 343 deletions tests/TestHelpers/OcisHelper.php

This file was deleted.

Loading

0 comments on commit 21002f0

Please sign in to comment.