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

Allow docker to run e2e tests #9400

Merged
merged 16 commits into from Aug 14, 2018

Conversation

Projects
None yet
6 participants
@PierreRambaud
Contributor

PierreRambaud commented Aug 2, 2018

Questions Answers
Branch? develop
Description? Add a proper docker-compose.yml file to run tests in isolate situation.
Type? improvement
Category? TE
BC breaks? no
Deprecations? no
How to test? Follow DOCKER.md file.

This change is Reviewable

@PierreRambaud PierreRambaud added the wip label Aug 2, 2018

@PierreRambaud PierreRambaud added this to the 1.7.5.0 milestone Aug 2, 2018

@PierreRambaud PierreRambaud changed the title from Allow docker to run e2e tests to [WIP] Allow docker to run e2e tests Aug 2, 2018

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 2, 2018

Contributor

@matks @mickaelandrieu Needs tests and feedback for improvement.

Contributor

PierreRambaud commented Aug 2, 2018

@matks @mickaelandrieu Needs tests and feedback for improvement.

PierreRambaud added some commits Aug 2, 2018

@matks

This comment has been minimized.

Show comment
Hide comment
@matks

matks Aug 3, 2018

Contributor

When the PR is not in WIP anymore, it needs to modify the file tests/E2E/README.md. The 2 files README.md and DOCKER.md are confusing right now as there is duplicated content.

Contributor

matks commented Aug 3, 2018

When the PR is not in WIP anymore, it needs to modify the file tests/E2E/README.md. The 2 files README.md and DOCKER.md are confusing right now as there is duplicated content.

PierreRambaud added some commits Aug 3, 2018

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 3, 2018

Contributor

@matks Done for the Readme ;)

Contributor

PierreRambaud commented Aug 3, 2018

@matks Done for the Readme ;)

- selenium-chrome
db:
image: mysql:5.7.22

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Aug 6, 2018

Member

Are we sure this tag will always be available? Isn't mysql:5.7 safer?

@Quetzacoalt91

Quetzacoalt91 Aug 6, 2018

Member

Are we sure this tag will always be available? Isn't mysql:5.7 safer?

This comment has been minimized.

@PierreRambaud

PierreRambaud Aug 6, 2018

Contributor

This tag contains a fix because of a bug with latest version of Mysql container. It's weird but recommended :/

@PierreRambaud

PierreRambaud Aug 6, 2018

Contributor

This tag contains a fix because of a bug with latest version of Mysql container. It's weird but recommended :/

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Aug 6, 2018

Member

Let's keeping it until the day we cannot use it anymore then. :)

@Quetzacoalt91

Quetzacoalt91 Aug 6, 2018

Member

Let's keeping it until the day we cannot use it anymore then. :)

@PierreRambaud PierreRambaud removed the wip label Aug 7, 2018

@PierreRambaud PierreRambaud changed the title from [WIP] Allow docker to run e2e tests to Allow docker to run e2e tests Aug 7, 2018

@PierreRambaud

This comment has been minimized.

Show comment
Hide comment
@PierreRambaud

PierreRambaud Aug 7, 2018

Contributor

I remove the WIP status, hope everyone will be able to run e2e tests from now. Don't hesitate to tell me if something is missing.

Contributor

PierreRambaud commented Aug 7, 2018

I remove the WIP status, hope everyone will be able to run e2e tests from now. Don't hesitate to tell me if something is missing.

foreach ($errors as $error_process) {
if (!is_array($error_process)) {

This comment has been minimized.

@PierreRambaud

PierreRambaud Aug 7, 2018

Contributor

@Quetzacoalt91 Having some errors here, don't know why $error_process isn't an array.

@PierreRambaud

PierreRambaud Aug 7, 2018

Contributor

@Quetzacoalt91 Having some errors here, don't know why $error_process isn't an array.

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Aug 9, 2018

Member

I guess the array we merged does not always respect this rule.

@Quetzacoalt91

Quetzacoalt91 Aug 9, 2018

Member

I guess the array we merged does not always respect this rule.

COPY prepare-prestashop.sh /tmp/prepare-prestashop.sh
COPY /prestashop/wait-for-it.sh /tmp/
COPY run-tests.sh /tmp/

This comment has been minimized.

@Quetzacoalt91

Quetzacoalt91 Aug 9, 2018

Member

Hmm, I wonder if this build can't be improved. The reason could be avoiding to download too many images, bu you could directly start from a nodejs image and copy the e2e tests in it. :)

@Quetzacoalt91

Quetzacoalt91 Aug 9, 2018

Member

Hmm, I wonder if this build can't be improved. The reason could be avoiding to download too many images, bu you could directly start from a nodejs image and copy the e2e tests in it. :)

This comment has been minimized.

@PierreRambaud

PierreRambaud Aug 9, 2018

Contributor

I tried with node image, but forget why I move to prestashop/base:7.2-apache ><

@PierreRambaud

PierreRambaud Aug 9, 2018

Contributor

I tried with node image, but forget why I move to prestashop/base:7.2-apache ><

@Quetzacoalt91

This comment has been minimized.

Show comment
Hide comment
@Quetzacoalt91

Quetzacoalt91 Aug 13, 2018

Member

Still broken unfortunately

prestashop_1       | wait-for-it.sh: db:3306 is available after 16 seconds
prestashop_1       | \n* Remove PrestaShop configuraiton files...
prestashop_1       | /tmp/docker_run.sh: line 23: [: argument expected
prestashop_1       | \n* Installing PrestaShop, this may take a while ...
prestashop_1       | \n* Drop & recreate mysql database...
prestashop_1       | mysqladmin: DROP DATABASE prestashop failed;
prestashop_1       | error: 'Can't drop database 'prestashop'; database doesn't exist'
prestashop_1       | /var/www/html /var/www/html
prestashop_1       | \n* Install Dependencies...
prestashop_1       | Do not run Composer as root/super user! See https://getcomposer.org/root for details
prestashop_1       | Loading composer repositories with package information
prestashop_1       | Installing dependencies (including require-dev) from lock file
prestashop_1       | Package operations: 8 installs, 2 updates, 0 removals
prestashop_1       |   - Updating prestashop/ps_themecusto (v1.0.6 => v1.0.8): Downloading (100%)         
prestashop_1       |   - Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)         
prestashop_1       |   - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)         
prestashop_1       |   - Installing composer/xdebug-handler (1.1.0): Downloading (100%)         
prestashop_1       |   - Installing composer/semver (1.4.2): Downloading (100%)         
prestashop_1       |   - Updating friendsofphp/php-cs-fixer (v1.13.3 => v2.12.2): Downloading (100%)         
prestashop_1       |   - Installing analog/analog (1.0.10-stable): Downloading (100%)         
prestashop_1       |   - Installing greenlion/php-sql-parser (v4.1.2): Downloading (100%)         
prestashop_1       |   - Installing prestashop/gsitemap (v3.2.2): Downloading (100%)         
prestashop_1       | 
prestashop_1       | /var/www/html
prestashop_1       | \n* Install PrestaShop...
prestashop_1       |                                                                    
prestashop_1       |   [RuntimeException]                                               
prestashop_1       |   modules/ps_customtext/ does not exist and could not be created.  
prestashop_1       |                                                                    
prestashop_1       | 
prestashop_1       | install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
prestashop_1       | 
Member

Quetzacoalt91 commented Aug 13, 2018

Still broken unfortunately

prestashop_1       | wait-for-it.sh: db:3306 is available after 16 seconds
prestashop_1       | \n* Remove PrestaShop configuraiton files...
prestashop_1       | /tmp/docker_run.sh: line 23: [: argument expected
prestashop_1       | \n* Installing PrestaShop, this may take a while ...
prestashop_1       | \n* Drop & recreate mysql database...
prestashop_1       | mysqladmin: DROP DATABASE prestashop failed;
prestashop_1       | error: 'Can't drop database 'prestashop'; database doesn't exist'
prestashop_1       | /var/www/html /var/www/html
prestashop_1       | \n* Install Dependencies...
prestashop_1       | Do not run Composer as root/super user! See https://getcomposer.org/root for details
prestashop_1       | Loading composer repositories with package information
prestashop_1       | Installing dependencies (including require-dev) from lock file
prestashop_1       | Package operations: 8 installs, 2 updates, 0 removals
prestashop_1       |   - Updating prestashop/ps_themecusto (v1.0.6 => v1.0.8): Downloading (100%)         
prestashop_1       |   - Installing symfony/polyfill-php72 (v1.8.0): Downloading (100%)         
prestashop_1       |   - Installing php-cs-fixer/diff (v1.3.0): Downloading (100%)         
prestashop_1       |   - Installing composer/xdebug-handler (1.1.0): Downloading (100%)         
prestashop_1       |   - Installing composer/semver (1.4.2): Downloading (100%)         
prestashop_1       |   - Updating friendsofphp/php-cs-fixer (v1.13.3 => v2.12.2): Downloading (100%)         
prestashop_1       |   - Installing analog/analog (1.0.10-stable): Downloading (100%)         
prestashop_1       |   - Installing greenlion/php-sql-parser (v4.1.2): Downloading (100%)         
prestashop_1       |   - Installing prestashop/gsitemap (v3.2.2): Downloading (100%)         
prestashop_1       | 
prestashop_1       | /var/www/html
prestashop_1       | \n* Install PrestaShop...
prestashop_1       |                                                                    
prestashop_1       |   [RuntimeException]                                               
prestashop_1       |   modules/ps_customtext/ does not exist and could not be created.  
prestashop_1       |                                                                    
prestashop_1       | 
prestashop_1       | install [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-autoloader] [--no-scripts] [--no-progress] [--no-suggest] [-v|vv|vvv|--verbose] [-o|--optimize-autoloader] [-a|--classmap-authoritative] [--apcu-autoloader] [--ignore-platform-reqs] [--] [<packages>]...
prestashop_1       | 

@Quetzacoalt91 Quetzacoalt91 merged commit 007863b into PrestaShop:develop Aug 14, 2018

1 of 2 checks passed

Codacy/PR Quality Review Not up to standards. This pull request quality could be better.
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
@Quetzacoalt91

This comment has been minimized.

Show comment
Hide comment
@Quetzacoalt91

Quetzacoalt91 Aug 14, 2018

Member

Tested locally, merging.

Thanks @PierreRambaud

Member

Quetzacoalt91 commented Aug 14, 2018

Tested locally, merging.

Thanks @PierreRambaud

@PierreRambaud PierreRambaud deleted the PierreRambaud:improvement/docker-e2e branch Aug 14, 2018

@mbadrani

This comment has been minimized.

Show comment
Hide comment
@mbadrani

mbadrani Sep 10, 2018

Contributor

@fatmaBouchekoua any problem in this pr?

Contributor

mbadrani commented Sep 10, 2018

@fatmaBouchekoua any problem in this pr?

@fatmaBouchekoua

This comment has been minimized.

Show comment
Hide comment
@fatmaBouchekoua

fatmaBouchekoua Sep 10, 2018

Contributor

I have this error when I run this command: docker-compose up
tests_1 | wait-for-it.sh: timeout occurred after waiting 360 seconds for prestashop-web:80 tests_1 | wait-for-it.sh: strict mode, refusing to execute subprocess e2e_tests_1 exited with code 124

Contributor

fatmaBouchekoua commented Sep 10, 2018

I have this error when I run this command: docker-compose up
tests_1 | wait-for-it.sh: timeout occurred after waiting 360 seconds for prestashop-web:80 tests_1 | wait-for-it.sh: strict mode, refusing to execute subprocess e2e_tests_1 exited with code 124

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment