Skip to content

Commit

Permalink
Remove docker-compose verification during extension
Browse files Browse the repository at this point in the history
docker-compose file verification shouldn't occur during the extension step since
the docker-compose files are meant to resolve in the context of the dock
container (e.g. env vars are set within and only within the dock container) so it
doesn't really make sense to do it before the dock container is even created.
  • Loading branch information
0xOI committed Mar 23, 2017
1 parent 070c5c0 commit 4e1a6a2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 22 deletions.
4 changes: 0 additions & 4 deletions bin/dock
Original file line number Diff line number Diff line change
Expand Up @@ -477,10 +477,6 @@ extend_container() {
fi

notice "Extending Dock: $1..."
# Ensure project contains a valid docker-compose.yml
if ! is_valid_docker_compose $default_compose_file; then
return 1
fi

# set image and container names accordingly
container_name "$(convert_to_valid_container_name $1)"
Expand Down
18 changes: 0 additions & 18 deletions test/options/extend.bats
Original file line number Diff line number Diff line change
Expand Up @@ -14,24 +14,6 @@ teardown() {
cd "${original_dir}"
}

@test "extending a Dock container with no docker-compose file at project root" {
run dock -e test

[ "$status" -eq 1 ]
[[ "$output" =~ "does NOT exist!" ]]
}

@test "extending a Dock container with an invalid docker-compose schema" {
file docker-compose.yml <<-EOF
version: 2 # version should be a string, not a numeral
EOF

run dock -e test

[ "$status" -eq 1 ]
[[ "$output" =~ "Invalid docker-compose schema detected!" ]]
}

@test "configuration labels are added to Dock container during extension" {
file Dockerfile <<-EOF
FROM alpine:latest
Expand Down

0 comments on commit 4e1a6a2

Please sign in to comment.