You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 19, 2024. It is now read-only.
You can use the `{{site.data.var.ct}}` package to run functional tests in the Docker environment. Functional tests are in the `src/Test/Functional/Acceptance` folder. See an example in the [ece-tools repository](https://github.com/magento/ece-tools/tree/develop/src/Test/Functional/Acceptance).
11
+
12
+
## Prerequisites
13
+
14
+
Before you run functional tests, you must prepare your environment with the following steps.
15
+
16
+
1. Stop all services that use the following ports:
17
+
18
+
-`80`—varnish
19
+
-`443`—web, tls
20
+
-`3306`—apache, mysql
21
+
22
+
1. Switch to the preferred PHP version for running tests.
By default, tests produce a short output. If you need a more detailed output, you can edit the `codeception.dist.yml` file and set the `printOutput:` property to `true`. !!! need location and example of `codeception.dist.yml`
43
+
44
+
### Run a specific test
45
+
46
+
Use the following format to run a specific functional test:
47
+
48
+
```bash
49
+
./vendor/bin/codecept run Acceptance <TestName>Cest
50
+
```
51
+
52
+
For example, the following runs a test on the post deploy...explain more here...
53
+
54
+
```bash
55
+
./vendor/bin/codecept run Acceptance PostDeployCest
56
+
```
57
+
58
+
Sample response:
59
+
60
+
```terminal
61
+
Need sample output here.
62
+
```
63
+
{: .no-copy}
64
+
65
+
### Run all tests
66
+
67
+
The following lists the scripts to run all tests for each version of PHP.
68
+
69
+
- **PHP 7.0**
70
+
71
+
```bash
72
+
./vendor/bin/codecept run -g php70 --steps
73
+
```
74
+
75
+
- **PHP 7.1**
76
+
77
+
```bash
78
+
./vendor/bin/codecept run -g php71 --steps
79
+
```
80
+
81
+
- **PHP 7.2**
82
+
83
+
```bash
84
+
./tests/travis/prepare_functional_parallel.sh
85
+
```
86
+
87
+
```bash
88
+
./vendor/bin/codecept run -g php72parallel_1 --steps
89
+
```
90
+
91
+
```bash
92
+
./vendor/bin/codecept run -g php72parallel_2 --steps
93
+
```
94
+
95
+
```bash
96
+
./vendor/bin/codecept run -g php72parallel_3 --steps
Copy file name to clipboardExpand all lines: guides/v2.1/cloud/docker/docker-development.md
+48-27Lines changed: 48 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,28 +9,27 @@ functional_areas:
9
9
10
10
{{site.data.var.ece}} provides a Docker environment option for those who use their local environment for development, test, or automation tasks. The {{site.data.var.ece}} Docker environment requires three, essential components: a {{site.data.var.ee}} v2 template, Docker Compose, and the {{site.data.var.ece}} `{{site.data.var.ct}}` package. See the instructions in [Launch Docker]({{page.baseurl}}/cloud/docker/docker-config.html).
11
11
12
-
The [Magento Cloud Docker repository](https://github.com/magento/magento-cloud-docker) contains build information for the following Docker images:
12
+
The [Magento Cloud Docker repository](https://github.com/magento/magento-cloud-docker) contains build information for the following Docker containers.
See the [service version values available]({{page.baseurl}}/cloud/docker/docker-config.html) for use when launching Docker.
16
+
The database container is based on the [mariadb](https://hub.docker.com/_/mariadb) image.
28
17
29
-
## Web container
18
+
- Port: 3306
19
+
- Volumes:
20
+
-`/var/lib/mysql`
21
+
-`./docker/mysql`
22
+
23
+
#### To import a database dump:
30
24
31
-
The web container works with the [PHP-FPM](https://php-fpm.org) to serve PHP code, the **DB** image for the local database, and the **Varnish** image to send requests and cache the results.
25
+
Place the SQL file into the `.docker/mysql/docker-entrypoint-initdb.d` folder.
26
+
27
+
The `{{site.data.var.ct}}` package imports and processes the SQL file the next time you build and start the Docker environment using the `docker-compose up` command.
28
+
29
+
Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `.docker/mnt` directory and importing it inside the Docker container.
32
30
33
31
## CLI containers
32
+
**FPM**<br>PHP-CLI: version 7<br>PHP-FPM: version 7 | [magento/magento-cloud-docker-php](https://hub.docker.com/r/magento/magento-cloud-docker-php)
34
33
35
34
The following CLI containers, which are based on a PHP-CLI image, provide `magento-cloud` and `{{site.data.var.ct}}` commands to perform file system operations:
36
35
@@ -56,7 +55,7 @@ The configured state is not ideal
56
55
```
57
56
{: .no-copy}
58
57
59
-
## Cron container
58
+
###Cron container
60
59
61
60
The Cron container is based on PHP-CLI images, and executes operations in the background immediately after the Docker environment start. It uses the cron configuration defined in the [`crons` property of the `.magento.app.yaml` file]({{page.baseurl}}/cloud/project/project-conf-files_magento-app.html#crons).
62
61
@@ -66,28 +65,50 @@ The Cron container is based on PHP-CLI images, and executes operations in the ba
66
65
docker-compose run deploy bash -c "cat /app/var/cron.log"
67
66
```
68
67
69
-
## Node Container
68
+
###Node container
70
69
71
-
The Node container is based on the [official Node Docker image](https://hub.docker.com/_/node/). It can be used to install NPM dependencies or run any Node-based command line tools.
70
+
The Node container is based on the [official Node Docker image](https://hub.docker.com/_/node/). It can be used to install NPM dependencies, such as [Gulp](), or run any Node-based command line tools.
72
71
73
-
## Database container
72
+
## PHP-FPM container
74
73
75
-
The database container is based on the `mariadb:10` image.
74
+
The PHP-FPM container is based on the [magento/magento-cloud-docker-php](https://hub.docker.com/r/magento/magento-cloud-docker-php) image.
76
75
77
-
#### To import a database dump:
76
+
- Port: 9000
77
+
- Read-only volumes:
78
+
-`/app`
79
+
-`/app/vendor`
80
+
-`/app/generated`
81
+
-`/app/setup`
82
+
- Read/Write volumes:
83
+
-`/app/var`
84
+
-`/app/app/etc`
85
+
-`/app/pub/static`
86
+
-`/app/pub/media`
78
87
79
-
Place the SQL file into the `.docker/mysql/docker-entrypoint-initdb.d` folder.
88
+
### Web container
80
89
81
-
The `{{site.data.var.ct}}` package imports and processes the SQL file the next time you build and start the Docker environment using the `docker-compose up` command.
90
+
The web container works with the [PHP-FPM](https://php-fpm.org) to serve PHP code, the [**DB** image](#database-container) for the local database, and the **Varnish** image to send requests and cache the results.
82
91
83
-
Although it is a more complex approach, you can use GZIP by _sharing_ the `.sql.gz` file using the `.docker/mnt` directory and importing it inside the Docker container.
92
+
### Varnish container
84
93
85
-
##Varnish container
94
+
The Varnish container is based on the [magento/magento-cloud-docker-varnish](https://hub.docker.com/r/magento/magento-cloud-docker-varnish) image. Varnish works on port 80.
86
95
87
-
The Varnish container is based on the `magento-cloud-docker-varnish` image. Varnish works on port 80.
96
+
### TLS container
88
97
89
98
The TLS termination proxy container, based on the [magento/magento-cloud-docker-tls](https://hub.docker.com/r/magento/magento-cloud-docker-tls) image, facilitates the Varnish SSL termination over HTTPS.
See the [service version values available]({{page.baseurl}}/cloud/docker/docker-config.html) for use when launching Docker.
111
+
91
112
## Sharing data between host machine and container
92
113
93
114
You can share files easily between your machine and a Docker container by placing the files in the `.docker/mnt` directory. You can find the files in the `/mnt` directory the next time you build and start the Docker environment using the `docker-compose up` command.
Copy file name to clipboardExpand all lines: guides/v2.1/cloud/release-notes/cloud-tools.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,8 @@ The release notes include:
35
35
36
36
- {:.new}<!-- MAGECLOUD-3451 -->Added a new command to the `{{site.data.var.ct}}` package that displays environment services, routes, or variables. See [Services, routes, and variable]({{page.baseurl}}/cloud/reference/ece-tools-reference.html#services-routes-and-variables). [Feature submitted by Vladimir Kerkhoff](https://github.com/magento/ece-tools/pull/486).
37
37
38
+
- {:.new}<!-- MAGECLOUD-3129/3684 -->You can now perform functional testing using the `{{site.data.var.ct}}` package in the Docker environment. See [Functional testing in Docker]({{page.baseurl}}/cloud/docker/docker-development-testing.html).
39
+
38
40
## v2002.0.19
39
41
40
42
- {:.fix}<!-- MAGECLOUD-3668 -->Fixed an issue that overwrites the `env.php` file during a deploy, resulting in a loss of custom configurations. This update ensures that {{site.data.var.ece}} updates the `env.php` file with every deployment, while preserving custom configurations.
0 commit comments