diff --git a/tests/tasks.bats b/tests/tasks.bats index a563d1cb..ac1c182d 100644 --- a/tests/tasks.bats +++ b/tests/tasks.bats @@ -6,7 +6,12 @@ setup() { @test "task: #Pull" { cd "$TESTDIR"/tasks/pull - "$DAGGER" --europa up + "$DAGGER" --europa up ./pull.cue +} + +@test "task: #Pull with auth" { + cd "$TESTDIR"/tasks/pull + "$DAGGER" --europa up ./pull_auth.cue } @test "task: #ReadFile" { @@ -39,4 +44,4 @@ setup() { "$DAGGER" --europa up ./user.cue "$DAGGER" --europa up ./workdir.cue -} \ No newline at end of file +} diff --git a/tests/tasks/pull/pull_auth.cue b/tests/tasks/pull/pull_auth.cue new file mode 100644 index 00000000..67ab1aab --- /dev/null +++ b/tests/tasks/pull/pull_auth.cue @@ -0,0 +1,18 @@ +package main + +import ( + "alpha.dagger.io/europa/dagger/engine" +) + +engine.#Plan & { + actions: pull: engine.#Pull & { + source: "alpine:3.15.0@sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + } & { + // assert result + digest: "sha256:e7d88de73db3d3fd9b2d63aa7f447a10fd0220b7cbf39803c803f2af9ba256b3" + config: { + Env: ["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"] + Cmd: ["/bin/sh"] + } + } +}