Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci]removed to do comment-in-behat-config #10434

Merged
merged 1 commit into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions tests/acceptance/TestHelpers/SetupHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,15 +53,13 @@ public static function getSuiteParameters(HookScope $scope):array {
* @param string|null $adminUsername
* @param string|null $adminPassword
* @param string|null $baseUrl
* @param string|null $ocPath
*
* @return void
*/
public static function init(
?string $adminUsername,
?string $adminPassword,
?string $baseUrl,
?string $ocPath
?string $baseUrl
): void {
foreach (\func_get_args() as $variableToCheck) {
if (!\is_string($variableToCheck)) {
Expand Down
22 changes: 2 additions & 20 deletions tests/acceptance/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,6 @@ class FeatureContext extends BehatVariablesContext {
* The password to use in tests that create public link shares
*/
private string $publicLinkSharePassword;
private string $ocPath;
private string $currentUser = '';
private string $currentServer;

Expand Down Expand Up @@ -458,29 +457,22 @@ public function usersToBeReplaced(): ?array {
/**
* BasicStructure constructor.
*
* @param string $baseUrl
* @param string $adminUsername
* @param string $adminPassword
* @param string $regularUserPassword
* @param string $ocPath
*
*/
public function __construct(
string $baseUrl,
string $adminUsername,
string $adminPassword,
string $regularUserPassword,
string $ocPath
) {
// Initialize your context here
$this->baseUrl = \rtrim($baseUrl, '/');
$this->adminUsername = $adminUsername;
$this->adminPassword = $adminPassword;
$this->regularUserPassword = $regularUserPassword;
$this->localBaseUrl = $this->baseUrl;
$this->currentServer = 'LOCAL';
$this->cookieJar = new CookieJar();
$this->ocPath = $ocPath;

// These passwords are referenced in tests and can be overridden by
// setting environment variables.
Expand All @@ -493,10 +485,8 @@ public function __construct(
$this->publicLinkSharePassword = "publicPwd:1";

$testServerUrl = OcisHelper::getServerUrl();
if ($testServerUrl !== false) {
$this->baseUrl = \rtrim($testServerUrl, '/');
$this->localBaseUrl = $this->baseUrl;
}
$this->baseUrl = \rtrim($testServerUrl, '/');
$this->localBaseUrl = $this->baseUrl;

// federated server url from the environment
$testRemoteServerUrl = \getenv('TEST_SERVER_FED_URL');
Expand Down Expand Up @@ -754,13 +744,6 @@ public function removeSchemeFromUrl(string $url): string {
);
}

/**
* @return string
*/
public function getOcPath(): string {
return $this->ocPath;
}

/**
* returns the base URL (which is without a slash at the end)
*
Expand Down Expand Up @@ -2627,7 +2610,6 @@ public function before(BeforeScenarioScope $scope): void {
$this->getAdminUsername(),
$this->getAdminPassword(),
$this->getBaseUrl(),
$this->getOcPath()
);

if ($this->isTestingWithLdap()) {
Expand Down
2 changes: 0 additions & 2 deletions tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,9 @@ default:
ldapInitialUserFilePath: /../config/ldap-users.ldif
contexts:
- FeatureContext: &common_feature_context_params
baseUrl: http://localhost:8080 # TODO: clean me
adminUsername: admin
adminPassword: admin
regularUserPassword: 123456
ocPath: apps/testing/api/v1/occ # TODO: clean me
- SettingsContext:
- GraphContext:
- SpacesContext:
Expand Down