From 1642f19301d9c01886c7074798f113cec3dce266 Mon Sep 17 00:00:00 2001 From: Daniel Siepmann Date: Sun, 4 Nov 2018 00:53:22 +0100 Subject: [PATCH] TASK: Fix TYPO3 Env --- .gitlab-ci.yml | 13 ++++++++++--- tests/Classes/Acceptance/Typo3Environment.php | 14 +++++++------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 79c605f..e210c6b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -23,13 +23,20 @@ setup:composer: test:acceptance: image: php:7.2-alpine stage: test + services: + - mysql:5.7 + variables: + MYSQL_DATABASE: workshopgitlabtesting + MYSQL_ROOT_PASSWORD: testing dependencies: - setup:composer before_script: - - apk --no-cache add sqlite - - cp public/index.php app + - docker-php-ext-install pdo pdo_mysql + - cp public/index.php app/index.php - cp public/typo3/index.php app/typo3/index.php - cp public/typo3/install.php app/typo3/install.php - - TYPO3_PATH_ROOT=$(pwd)/app/typo3temp/var/tests/acceptance TYPO3_PATH_APP=$(pwd)/app/typo3temp/var/tests/acceptance php -S 127.0.0.1:8080 -t app/typo3temp/var/tests/acceptance & + - sed -i.bak -e '133,136d' vendor/typo3/testing-framework/Classes/Core/Testbase.php + - mkdir -p app/typo3temp/var/tests/acceptance + - env TYPO3_PATH_ROOT="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" TYPO3_PATH_APP="$CI_PROJECT_DIR/app/typo3temp/var/tests/acceptance" php -S 127.0.0.1:8080 -t app/typo3temp/var/tests/acceptance & script: - ./vendor/bin/codecept run diff --git a/tests/Classes/Acceptance/Typo3Environment.php b/tests/Classes/Acceptance/Typo3Environment.php index 5d2feff..49ed013 100644 --- a/tests/Classes/Acceptance/Typo3Environment.php +++ b/tests/Classes/Acceptance/Typo3Environment.php @@ -33,13 +33,13 @@ class Typo3Environment extends BackendEnvironment public function _initialize() { ArrayUtility::mergeRecursiveWithOverrule($this->config, [ - 'typo3DatabaseDriver' => 'pdo_sqlite', - // 'typo3DatabaseDriver' => 'pdo_mysql', - // 'typo3DatabaseHost' => 'localhost', - // 'typo3DatabaseUsername' => 'testing', - // 'typo3DatabasePassword' => 'testing', - // 'typo3DatabaseName' => 'workshopgitlabtesting', - // 'typo3DatabasePort' => '3306', + // 'typo3DatabaseDriver' => 'pdo_sqlite', + // 'typo3DatabaseName' => 'workshopgitlabtesting.sqlite', + 'typo3DatabaseDriver' => 'pdo_mysql', + 'typo3DatabaseHost' => 'mysql', + 'typo3DatabaseUsername' => 'root', + 'typo3DatabasePassword' => 'testing', + 'typo3DatabaseName' => 'workshopgitlabtesting', 'coreExtensionsToLoad' => [ 'core', 'extbase',