From f48d145f036c0c72af5b7baa26d43b6adea3469d Mon Sep 17 00:00:00 2001 From: Richard Jones Date: Tue, 5 Oct 2021 12:40:39 -0600 Subject: [PATCH] added registry to test, and fixed cp commands Signed-off-by: Richard Jones --- docs/learn/tests/doc.bats | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/docs/learn/tests/doc.bats b/docs/learn/tests/doc.bats index da94141c..ecac9f2a 100644 --- a/docs/learn/tests/doc.bats +++ b/docs/learn/tests/doc.bats @@ -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" {