Skip to content

Commit

Permalink
Merge pull request #9924 from owncloud/reorganize-test-folders
Browse files Browse the repository at this point in the history
[tests-only][full-ci] reorganize test folders within the acceptance directory
  • Loading branch information
saw-jan committed Aug 28, 2024
2 parents fb20e78 + d8d7b70 commit 43bc43b
Show file tree
Hide file tree
Showing 51 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .codacy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ exclude_paths:
- 'accounts/rollup.config.js'
- 'deployments/**'
- 'tests/acceptance/expected-failures-*.md'
- 'tests/acceptance/features/bootstrap/**'
- 'tests/TestHelpers/**'
- 'tests/acceptance/bootstrap/**'
- 'tests/acceptance/TestHelpers/**'
- 'tests/acceptance/run.sh'
- 'vendor/**/*'
- 'tests/ociswrapper/vendor/**'
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ ci-format: $(BUILDIFIER)
.PHONY: test-php-style
test-php-style: vendor-bin/owncloud-codestyle/vendor vendor-bin/php_codesniffer/vendor
$(PHP_CS_FIXER) fix -v --diff --allow-risky yes --dry-run
$(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/TestHelpers
$(PHP_CODESNIFFER) --cache --runtime-set ignore_warnings_on_exit --standard=phpcs.xml tests/acceptance tests/acceptance/TestHelpers

.PHONY: test-php-style-fix
test-php-style-fix: vendor-bin/owncloud-codestyle/vendor
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class HttpLogger {
* @return string
*/
public static function getLogDir(): string {
return __DIR__ . '/../acceptance/logs';
return __DIR__ . '/../logs';
}

/**
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2453,7 +2453,7 @@ public function temporaryStorageSubfolderName(): string {
* @return string
*/
public function acceptanceTestsDirLocation(): string {
return \dirname(__FILE__) . "/../../";
return \dirname(__FILE__) . "/../";
}

/**
Expand Down Expand Up @@ -2857,9 +2857,9 @@ public static function getScenarioLine($scope): string {
public static function isExpectedToFail(string $scenarioLine): bool {
$expectedFailFile = \getenv('EXPECTED_FAILURES_FILE');
if (!$expectedFailFile) {
$expectedFailFile = __DIR__ . '/../../expected-failures-localAPI-on-OCIS-storage.md';
$expectedFailFile = __DIR__ . '/../expected-failures-localAPI-on-OCIS-storage.md';
if (\strpos($scenarioLine, "coreApi") === 0) {
$expectedFailFile = __DIR__ . '/../../expected-failures-API-on-OCIS-storage.md';
$expectedFailFile = __DIR__ . '/../expected-failures-API-on-OCIS-storage.md';
}
}

Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,7 @@ public function getOCSResponseStatusMessage(ResponseInterface $response):string
public function getActualStatusMessage(string $statusMessage, ?string $language = null):string {
if ($language !== null) {
$multiLingualMessage = \json_decode(
\file_get_contents(__DIR__ . "/../../fixtures/multiLanguageErrors.json"),
\file_get_contents(__DIR__ . "/../fixtures/multiLanguageErrors.json"),
true
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ public function theConfigHasBeenSetTo(string $configVariable, string $configValu
* @throws GuzzleException
*/
public function theConfigHasBeenSetPathTo(string $configVariable, string $path): void {
$path = \dirname(__FILE__) . "/../../../" . $path;
$path = \dirname(__FILE__) . "/../../" . $path;
$response = OcisConfigHelper::reConfigureOcis(
[
$configVariable => $path
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -3939,7 +3939,7 @@ public function checkImageDimensions(string $width, string $height, ?ResponseInt
* @throws Exception
*/
public function theDownloadedPreviewContentShouldMatchWithFixturesPreviewContentFor(string $filename):void {
$expectedPreview = \file_get_contents(__DIR__ . "/../../fixtures/" . $filename);
$expectedPreview = \file_get_contents(__DIR__ . "/../fixtures/" . $filename);
Assert::assertEquals($expectedPreview, $this->responseBodyContent);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

$classLoader = new ClassLoader();

$classLoader->addPsr4("TestHelpers\\", __DIR__ . "/../../../TestHelpers", true);
$classLoader->addPsr4("TestHelpers\\", __DIR__ . "/../TestHelpers", true);

$classLoader->register();

Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/config/behat-core.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default:
autoload:
"": "%paths.base%/../features/bootstrap"
"": "%paths.base%/../bootstrap"
suites:
coreApiMain:
paths:
Expand Down
2 changes: 1 addition & 1 deletion tests/acceptance/config/behat.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
default:
autoload:
"": "%paths.base%/../features/bootstrap"
"": "%paths.base%/../bootstrap"

suites:
apiAccountsHashDifficulty:
Expand Down

0 comments on commit 43bc43b

Please sign in to comment.