Commit b12f37ab authored by Anja Leichsenring's avatar Anja Leichsenring Committed by Richard Haeser
Browse files

[TASK] Integrate InstallTool acceptance suite into Backend suite

The acceptance test suite for the stand alone install tool can
easily coexist with the other backend related tests, there is
no good reason for the overhead of a separate suite. So it gets
merged into the backend suite.

Resolves: #93621
Releases: master, 10.4
Change-Id: I460596985cd992c4f7d59df989c7992590e479d8
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/68158


Tested-by: core-ci's avatarcore-ci <typo3@b13.com>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Tested-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
Reviewed-by: Andreas Fernandez's avatarAndreas Fernandez <a.fernandez@scripting-base.de>
Reviewed-by: Richard Haeser's avatarRichard Haeser <richard@richardhaeser.com>
parent e41c11f3
......@@ -89,7 +89,6 @@ Options:
-s <...>
Specifies which test suite to run
- acceptance: main backend acceptance tests
- acceptanceInstallTool: acceptance tests for stand alone install tool
- buildCss: execute scss to css builder
- buildJavascript: execute typescript to javascript builder
- cglGit: test and fix latest committed patch for CGL compliance
......@@ -446,13 +445,6 @@ case ${TEST_SUITE} in
esac
docker-compose down
;;
acceptanceInstallTool)
setUpDockerComposeDotEnv
docker-compose run prepare_acceptance_installtool_mariadb
docker-compose run acceptance_installtool_mariadb
SUITE_EXIT_CODE=$?
docker-compose down
;;
buildCss)
setUpDockerComposeDotEnv
docker-compose run build_css
......
......@@ -520,63 +520,6 @@ abstract class AbstractCoreSpec {
return jobs;
}
ArrayList<Job> getJobsAcceptanceTestsInstallToolMysql(int stageNumber, String requirementIdentifier, Task composerTask, Boolean isSecurity) {
String name = getTaskNamePartForComposer(stageNumber);
ArrayList<Job> jobs = new ArrayList<Job>();
jobs.add(new Job("Accept InstallTool my " + name + " " + requirementIdentifier, new BambooKey("ACITMY" + stageNumber + requirementIdentifier))
.description("Run acceptance tests for install tool " + requirementIdentifier)
.pluginConfigurations(this.getDefaultJobPluginConfiguration())
.tasks(
this.getTaskGitCloneRepository(),
this.getTaskGitCherryPick(isSecurity),
this.getTaskStopDanglingContainers(),
composerTask,
this.getTaskPrepareAcceptanceTest(requirementIdentifier),
this.getTaskDockerDependenciesAcceptanceBackendMariadb10(),
new ScriptTask()
.description("Execute codeception acceptance test for standalone install tool.")
.interpreter(ScriptTaskProperties.Interpreter.BINSH_OR_CMDEXE)
.inlineBody(
this.getScriptTaskBashInlineBody() +
"function codecept() {\n" +
" docker run \\\n" +
" -u ${HOST_UID} \\\n" +
" -v /bamboo-data/${BAMBOO_COMPOSE_PROJECT_NAME}/passwd:/etc/passwd \\\n" +
" -v ${BAMBOO_COMPOSE_PROJECT_NAME}_bamboo-data:/srv/bamboo/xml-data/build-dir/ \\\n" +
" -e typo3DatabaseName=func_test \\\n" +
" -e typo3DatabaseUsername=root \\\n" +
" -e typo3DatabasePassword=funcp \\\n" +
" -e typo3DatabaseHost=mariadb10 \\\n" +
" --name ${BAMBOO_COMPOSE_PROJECT_NAME}sib_adhoc \\\n" +
" --network ${BAMBOO_COMPOSE_PROJECT_NAME}_test \\\n" +
" --rm \\\n" +
" typo3gmbh/" + requirementIdentifier.toLowerCase() + ":latest \\\n" +
" bin/bash -c \"cd ${PWD}; ./bin/codecept $*\"\n" +
"}\n" +
"\n" +
"codecept run InstallTool -d -c typo3/sysext/core/Tests/codeception.yml --env=mysql --xml reports.xml --html reports.html\n"
)
)
.finalTasks(
this.getTaskStopDockerDependencies(),
new TestParserTask(TestParserTaskProperties.TestType.JUNIT)
.resultDirectories("typo3temp/var/tests/AcceptanceReports/reports.xml")
)
.artifacts(new Artifact()
.name("Test Report")
.copyPattern("typo3temp/var/tests/AcceptanceReports/")
.shared(false)
)
.requirements(
this.getRequirementDocker10()
)
.cleanWorkingDirectory(true)
);
return jobs;
}
/**
* Jobs for mysql based functional tests with driver mysqli
*/
......
......@@ -54,7 +54,6 @@ abstract class AbstractPreMergeSpec extends AbstractCoreSpec {
jobsMainStage.add(this.getJobAcceptanceTestInstallSqlite(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsBackendMysql(0, numberOfAcceptanceTestJobs, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.addAll(this.getJobsAcceptanceTestsInstallToolMysql(0, phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationPhpStan(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
jobsMainStage.add(this.getJobIntegrationDocBlocks(phpVersions[0], this.getTaskComposerInstall(phpVersions[0]), isSecurity));
......
......@@ -245,15 +245,12 @@ public class NightlySpec extends AbstractCoreSpec {
String phpVersion = "PHP74";
Task composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MIN);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_MIN, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsInstallToolMysql(COMPOSER_MIN, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_DEFAULT);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_DEFAULT, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsInstallToolMysql(COMPOSER_DEFAULT, phpVersion, composerTask, false));
composerTask = getComposerTaskByStageNumber(phpVersion, COMPOSER_MAX);
jobs.add(this.getJobAcceptanceTestInstallPgsql(COMPOSER_MAX, phpVersion, composerTask, false));
jobs.addAll(this.getJobsAcceptanceTestsInstallToolMysql(COMPOSER_MAX, phpVersion, composerTask, false));
stages.add(new Stage("Acceptance pgsql").jobs(jobs.toArray(new Job[0])));
return stages;
......
......@@ -57,7 +57,6 @@ include:
- local: 'Build/gitlab-ci/pre-merge/early.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-install.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-backend.yml'
- local: 'Build/gitlab-ci/pre-merge/acceptance-installtool.yml'
- local: 'Build/gitlab-ci/pre-merge/integrity.yml'
- local: 'Build/gitlab-ci/pre-merge/functional.yml'
- local: 'Build/gitlab-ci/pre-merge/unit.yml'
......@@ -66,7 +65,6 @@ include:
- local: 'Build/gitlab-ci/nightly/integrity.yml'
- local: 'Build/gitlab-ci/nightly/unit.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-install.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-installtool.yml'
- local: 'Build/gitlab-ci/nightly/acceptance-backend.yml'
- local: 'Build/gitlab-ci/nightly/functional.yml'
- local: 'Build/gitlab-ci/nightly/notify.yml'
acceptance installtool mariadb php 7.4:
stage: acceptance
only:
- schedules
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s acceptanceInstallTool -p 7.4
acceptance installtool mariadb php 7.4 pre-merge:
stage: main
except:
refs:
- schedules
- master
artifacts:
when: on_failure
paths:
- typo3temp/var/tests/AcceptanceReports
script:
- Build/Scripts/runTests.sh -s composerInstall -p 7.4
- Build/Scripts/runTests.sh -s acceptanceInstallTool -p 7.4
......@@ -200,46 +200,6 @@ services:
php -dxdebug.mode=off $${COMMAND}
"
prepare_acceptance_installtool_mariadb:
image: alpine:3.8
links:
- mariadb
- chrome
- web
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
echo Waiting for database start...;
while ! nc -z mariadb 3306; do
sleep 1;
done;
echo Database is up;
"
acceptance_installtool_mariadb:
image: typo3/core-testing-${DOCKER_PHP_IMAGE}:latest
user: ${HOST_UID}
environment:
typo3DatabaseName: func_test
typo3DatabaseUsername: root
typo3DatabasePassword: funcp
typo3DatabaseHost: mariadb
volumes:
- ${CORE_ROOT}:${CORE_ROOT}
- ${HOST_HOME}:${HOST_HOME}
- ${PASSWD_PATH}:/etc/passwd:ro
- /etc/group:/etc/group:ro
working_dir: ${CORE_ROOT}
command: >
/bin/sh -c "
if [ ${SCRIPT_VERBOSE} -eq 1 ]; then
set -x
fi
mkdir -p typo3temp/var/tests/ \
&& php -dxdebug.mode=off bin/codecept run InstallTool -d -c typo3/sysext/core/Tests/codeception.yml ${TEST_FILE} --xml reports.xml --html reports.html
"
prepare_acceptance_install_mysql:
image: alpine:3.8
links:
......
......@@ -15,7 +15,7 @@ declare(strict_types=1);
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Acceptance\InstallTool;
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\InstallTool;
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Crypto\PasswordHashing\Argon2iPasswordHash;
......
......@@ -15,7 +15,7 @@ declare(strict_types=1);
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Acceptance\InstallTool;
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\InstallTool;
use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
......
......@@ -15,7 +15,7 @@ declare(strict_types=1);
* The TYPO3 project - inspiring people to share!
*/
namespace TYPO3\CMS\Core\Tests\Acceptance\InstallTool;
namespace TYPO3\CMS\Core\Tests\Acceptance\Backend\InstallTool;
use TYPO3\CMS\Core\Tests\Acceptance\Support\BackendTester;
......
class_name: BackendTester
modules:
enabled:
- WebDriver:
url: '%typo3TestingAcceptanceBaseUrl%/typo3temp/var/tests/acceptance'
browser: chrome
wait: 1
host: chrome
- \TYPO3\TestingFramework\Core\Acceptance\Helper\Acceptance
- Asserts
extensions:
enabled:
- TYPO3\CMS\Core\Tests\Acceptance\Support\Extension\BackendCoreEnvironment
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment