mirror of
https://github.com/owncloud/ocis
synced 2026-04-25 17:25:21 +02:00
tests: update ocm setup and docs
docs: separate provider config tests: substitution for local and remote server urls tests: create local configs tests: fix vscode debugger config tests: separate federation share steps
This commit is contained in:
@@ -52,20 +52,6 @@ class OcmContext implements Context {
|
||||
$this->featureContext = BehatHelper::getContext($scope, $environment, 'FeatureContext');
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getOcisDomain(): string {
|
||||
return $this->extractDomain(OcisHelper::getServerUrl());
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
*/
|
||||
public function getFedOcisDomain(): string {
|
||||
return $this->extractDomain(\getenv('TEST_SERVER_FED_URL'));
|
||||
}
|
||||
|
||||
/**
|
||||
* @return string
|
||||
* @throws Exception
|
||||
@@ -77,18 +63,6 @@ class OcmContext implements Context {
|
||||
return $this->invitationToken;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function extractDomain($url): string {
|
||||
if (!$url) {
|
||||
return "localhost";
|
||||
}
|
||||
return parse_url($url)["host"];
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $user
|
||||
* @param string $email
|
||||
@@ -152,7 +126,10 @@ class OcmContext implements Context {
|
||||
* @throws GuzzleException
|
||||
*/
|
||||
public function acceptInvitation(string $user, string $token = null): ResponseInterface {
|
||||
$providerDomain = ($this->featureContext->getCurrentServer() === "LOCAL") ? $this->getFedOcisDomain() : $this->getOcisDomain();
|
||||
$providerDomain = $this->featureContext->getLocalBaseUrlWithoutScheme();
|
||||
if ($this->featureContext->getCurrentServer() === "LOCAL") {
|
||||
$providerDomain = $this->featureContext->getRemoteBaseUrlWithoutScheme();
|
||||
}
|
||||
return OcmHelper::acceptInvitation(
|
||||
$this->featureContext->getBaseUrl(),
|
||||
$this->featureContext->getStepLineRef(),
|
||||
|
||||
Reference in New Issue
Block a user