Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
LeipeLeon committed Nov 10, 2023
1 parent 69adf02 commit e2f6c52
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ compose:
- docker/docker-compose.$COMPOSE_EXT.yml
- docker/docker-compose.$DIP_OS.yml
project_name: bear
# project_name: $COMPOSE_PROJECT_NAME

kubectl:
namespace: rocket-$STAGE
Expand Down
9 changes: 9 additions & 0 deletions spec/lib/dip/commands/compose_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,15 @@
it { expected_exec("docker-compose", ["--project-name", "rocket-test", "run"]) }
end

context "when config contains project_name with env vars", :config, :env do
let(:config) { {compose: {project_name: "$PROJECT_NAME"}, environment: {PROJECT_NAME: $COMPOSE_PROJECT_NAME}} }
let(:env) { {"COMPOSE_PROJECT_NAME" => "space-test"} }

before { cli.start "compose run".shellsplit }

it { expected_exec("docker-compose", ["--project-name", "space-test", "run"]) }
end

context "when config contains project_directory", :config do
let(:config) { {compose: {project_directory: "/foo/bar"}} }

Expand Down

0 comments on commit e2f6c52

Please sign in to comment.