added registry to test, and fixed cp commands

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones 2021-10-05 12:40:39 -06:00
parent 79489ffe36
commit f48d145f03

View File

@ -12,18 +12,23 @@ setup() {
setup_example_sandbox
# Follow tutorial
mkdir -p "$DAGGER_SANDBOX"/getting-started/plans
cp -R "$DAGGER_PROJECT"/getting-started/ "$DAGGER_SANDBOX"/getting-started/
mkdir -p "$DAGGER_SANDBOX"/plans/local
cp "$DAGGER_PROJECT"/getting-started/plans/todoapp.cue "$DAGGER_SANDBOX"/plans/todoapp.cue
cp "$DAGGER_PROJECT"/getting-started/plans/local/local.cue "$DAGGER_SANDBOX"/plans/local/local.cue
dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/getting-started/plans/local
dagger --project "$DAGGER_SANDBOX" new 'local' -p "$DAGGER_SANDBOX"/plans/local
dagger --project "$DAGGER_SANDBOX" -e 'local' input socket run.socket /var/run/docker.sock
dagger --project "$DAGGER_SANDBOX" -e 'local' input dir app.source "$DAGGER_SANDBOX"
docker run -d -p 5000:5000 --name registry registry:2
dagger --project "$DAGGER_SANDBOX" -e 'local' up
until docker inspect --format "{{json .State.Status }}" todoapp | grep -m 1 "running"; do sleep 1 ; done
run curl -f -LI http://localhost:8080
assert_output --partial '200 OK'
docker stop todoapp && docker rm todoapp
docker stop registry && docker rm registry
}
@test "doc-1004-first-env" {