tests: added test for Pull with registry auth

Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
Sam Alba 2021-12-15 19:57:44 -08:00
parent 0be6a4066e
commit d668dd6dd2
2 changed files with 25 additions and 2 deletions

View File

@ -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
}
}

View File

@ -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"]
}
}
}