feat: add COMPOSE_FILE env variable

Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
This commit is contained in:
AhmedGrati
2023-11-05 15:02:36 +01:00
parent 032b61a656
commit a91b57ef2e
5 changed files with 124 additions and 1 deletions
+4
View File
@@ -310,3 +310,7 @@ convert::expect_success "$os_cmd" "$os_output" || exit 1
cmd="kompose -f $KOMPOSE_ROOT/script/test/fixtures/no-profile-warning/docker-compose.yaml convert"
convert::expect_warning "$cmd" "No service selected. The profile specified in services of your compose yaml may not exist." || exit 1
# Test COMPOSE_FILE env variable is honored
k8s_cmd="COMPOSE_FILE=\"$KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/docker-compose.yaml $KOMPOSE_ROOT/script/test/fixtures/compose-file-env-variable/alternative-docker-compose.yaml\" kompose convert --stdout --with-kompose-annotation=false"
k8s_output="$KOMPOSE_ROOT/script/test/fixtures/fixtures/compose-file-env-variable/output-k8s.yaml"
convert::expect_success "$k8s_cmd" "$k8s_output" || exit 1