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] Make graph api default in test #8290

Merged
merged 2 commits into from
Jan 30, 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
2 changes: 0 additions & 2 deletions .drone.star
Original file line number Diff line number Diff line change
Expand Up @@ -822,7 +822,6 @@ def localApiTestPipeline(ctx):

def localApiTests(suite, storage, extra_environment = {}):
environment = {
"TEST_WITH_GRAPH_API": "true",
"PATH_TO_OCIS": dirs["base"],
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
Expand Down Expand Up @@ -1006,7 +1005,6 @@ def coreApiTests(ctx, part_number = 1, number_of_parts = 1, storage = "ocis", ac
"name": "oC10ApiTests-%s-storage-%s" % (storage, part_number),
"image": OC_CI_PHP % DEFAULT_PHP_VERSION,
"environment": {
"TEST_WITH_GRAPH_API": "true",
"PATH_TO_OCIS": "%s" % dirs["base"],
"TEST_SERVER_URL": "https://ocis-server:9200",
"OCIS_REVA_DATA_ROOT": "%s" % (dirs["ocisRevaDataRoot"] if storage == "owncloud" else ""),
Expand Down
7 changes: 0 additions & 7 deletions docs/ocis/development/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -223,15 +223,13 @@ ocis/bin/ocis server
```bash
make test-acceptance-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_WITH_GRAPH_API=true \
```

#### Run Tests Transferred From ownCloud Core (prefix `coreApi`)

```bash
make test-acceptance-from-core-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_WITH_GRAPH_API=true \
```

Useful environment variables:
Expand Down Expand Up @@ -289,7 +287,6 @@ If you want to work on a specific issue
```bash
make test-acceptance-from-core-api \
TEST_SERVER_URL=https://localhost:9200 \
TEST_WITH_GRAPH_API=true \
STORAGE_DRIVER=OCIS \
BEHAT_FEATURE='tests/acceptance/features/coreApiVersions/fileVersions.feature:147'
```
Expand Down Expand Up @@ -326,7 +323,6 @@ PROXY_ENABLE_BASIC_AUTH=true \

```bash
OCIS_WRAPPER_URL=http://localhost:5200 \
TEST_WITH_GRAPH_API=true \
TEST_SERVER_URL="https://localhost:9200" \
BEHAT_FEATURE=tests/acceptance/features/apiAsyncUpload/delayPostprocessing.feature \
make test-acceptance-api
Expand Down Expand Up @@ -374,7 +370,6 @@ ocis/bin/ocis server
Run the acceptance test with the following command:

```bash
TEST_WITH_GRAPH_API=true \
TEST_SERVER_URL="https://localhost:9200" \
EMAIL_HOST="localhost" \
EMAIL_PORT=9000 \
Expand Down Expand Up @@ -417,7 +412,6 @@ ocis/bin/ocis server
Run the acceptance test with the following command:

```bash
TEST_WITH_GRAPH_API=true \
TEST_SERVER_URL="https://localhost:9200" \
BEHAT_FEATURE="tests/acceptance/features/apiSearch/contentSearch.feature" \
make test-acceptance-api
Expand Down Expand Up @@ -539,7 +533,6 @@ For antivirus running with docker, use `ANTIVIRUS_CLAMAV_SOCKET= "tcp://host.doc
Run the acceptance test with the following command:

```bash
TEST_WITH_GRAPH_API=true \
TEST_SERVER_URL="https://localhost:9200" \
BEHAT_FEATURE="tests/acceptance/features/apiAntivirus/antivirus.feature" \
make test-acceptance-api
Expand Down
7 changes: 0 additions & 7 deletions tests/TestHelpers/OcisHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,6 @@ public static function isTestingParallelDeployment(): bool {
return (\getenv("TEST_PARALLEL_DEPLOYMENT") === "true");
}

/**
* @return bool
*/
public static function isTestingWithGraphApi(): bool {
return \getenv('TEST_WITH_GRAPH_API') === 'true';
}

/**
* @return bool|string false if no command given or the command as string
*/
Expand Down
1 change: 0 additions & 1 deletion tests/acceptance/docker/src/acceptance.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ services:
environment:
OCIS_ROOT: /drone/src
TEST_SERVER_URL: https://ocis-server:9200
TEST_WITH_GRAPH_API: "true"
OCIS_WRAPPER_URL: http://ocis-server:5200
STORAGE_DRIVER: $STORAGE_DRIVER
TEST_SOURCE: $TEST_SOURCE
Expand Down
8 changes: 3 additions & 5 deletions tests/acceptance/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -3244,11 +3244,9 @@ public function before(BeforeScenarioScope $scope): void {
$this->connectToLdap($suiteParameters);
}

if (OcisHelper::isTestingWithGraphApi()) {
$this->graphContext = new GraphContext();
$this->graphContext->before($scope);
$environment->registerContext($this->graphContext);
}
$this->graphContext = new GraphContext();
$this->graphContext->before($scope);
$environment->registerContext($this->graphContext);
}

/**
Expand Down
Loading