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

Feature/integration tests config #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

vpodorozh
Copy link

Introducing integration tests configs:

  • yml pipeline config
  • phpunit template config

@DavidLambauer
Copy link
Member

HI @vpodorozh,

thank you for the PR.

@mwr and I reviewed this PR, and we have the following change requests:

  • Please remove magento2/integration-tests/phpunit-integration.xml.dist. This file should always be project specific
  • The config.php is also always project-specific. Please use an env var with the path's default to the default config.php
  • Please research if the services can be configured through an env var. The elasticsearch version, for example can change between multiple Magento Versions

- name: mariadb:10.4
alias: db
command: ["--innodb-buffer-pool-size=1024M --innodb-log-buffer-size=32M --max_allowed_packet=325058560"]
- name: docker.elastic.co/elasticsearch/elasticsearch:7.6.2
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Research if this can be dynamic

ELASTICSEARCH_PORT: 9200

# mysql config for integration tests
INSTALL_CONFIG_MYSQL: >
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this and point the Var to the default Magento path. We have to check in the config.php into VCS then.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To set the ENVIRONMENT Variables, you can work with sed

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Replace only on lines matching the line pattern:
sed '/line_pattern/s/find/replace/' filename

- ${PHP_BIN} bin/magento
- echo "---------- MAGENTO SETUP:INSTALL ----------"
## install magento, using 'yes' to answer all interaction questions (yes |) and ignoring all warnings that could occur while installation ( || true)
- yes | ${PHP_BIN} bin/magento setup:install --db-host=${APP_DB_HOST} --db-name=${APP_DB_NAME} --db-password=${APP_DB_PASS} --db-user=${APP_DB_USER} --search-engine="elasticsearch7" --elasticsearch-host=${ELASTICSEARCH_HOST} --elasticsearch-port=${ELASTICSEARCH_PORT} [email protected] --admin-firstname=Admin --admin-lastname=Admin --admin-password=admin123 --admin-user=admin --backend-frontname=admin --base-url=http://build.run-as-root.test --currency=EUR --language=en_US --session-save=files --timezone=Europe/Berlin --use-rewrites=1 -vvv || true
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please also use redis caching here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please rename the admin-email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants