mirror of
https://github.com/containers/podman-compose.git
synced 2025-06-30 04:30:03 +02:00
tests/integration: Automate 'env-file-tests' manual tests
Signed-off-by: Monika Kairaityte <monika@kibit.lt>
This commit is contained in:
@ -1,37 +0,0 @@
|
||||
running the following commands should always give podman-rocks-123
|
||||
|
||||
```
|
||||
podman-compose -f project/container-compose.yaml --env-file env-files/project-1.env up
|
||||
```
|
||||
|
||||
```
|
||||
podman-compose -f $(pwd)/project/container-compose.yaml --env-file $(pwd)/env-files/project-1.env up
|
||||
```
|
||||
|
||||
```
|
||||
podman-compose -f $(pwd)/project/container-compose.env-file-flat.yaml up
|
||||
```
|
||||
|
||||
```
|
||||
podman-compose -f $(pwd)/project/container-compose.env-file-obj.yaml up
|
||||
```
|
||||
|
||||
```
|
||||
podman-compose -f $(pwd)/project/container-compose.env-file-obj-optional.yaml up
|
||||
```
|
||||
|
||||
based on environment variable precedent this command should give podman-rocks-321
|
||||
|
||||
```
|
||||
ZZVAR1=podman-rocks-321 podman-compose -f $(pwd)/project/container-compose.yaml --env-file $(pwd)/env-files/project-1.env up
|
||||
```
|
||||
|
||||
_The below test should print three environment variables_
|
||||
|
||||
```
|
||||
podman-compose -f $(pwd)/project/container-compose.load-.env-in-project.yaml run --rm app
|
||||
|
||||
ZZVAR1=This value is overwritten by env-file-tests/.env
|
||||
ZZVAR2=This value is loaded from .env in project/ directory
|
||||
ZZVAR3=This value is loaded from env-file-tests/.env
|
||||
```
|
@ -7,5 +7,5 @@ services:
|
||||
- /tmp
|
||||
env_file:
|
||||
- path: ../env-files/project-1.env
|
||||
- path: ../env-files/project-2.env
|
||||
- path: ../env-files/project-2.env # this file exists
|
||||
required: false
|
@ -0,0 +1,11 @@
|
||||
services:
|
||||
app:
|
||||
image: busybox
|
||||
command: ["/bin/busybox", "sh", "-c", "env | grep ZZ"]
|
||||
tmpfs:
|
||||
- /run
|
||||
- /tmp
|
||||
env_file:
|
||||
- path: ../env-files/project-1.env
|
||||
- path: ../env-files/project-3.env # this file is missing
|
||||
required: false
|
Reference in New Issue
Block a user