tests: added test for Pull with registry auth
Signed-off-by: Sam Alba <samalba@users.noreply.github.com>
This commit is contained in:
parent
0be6a4066e
commit
d668dd6dd2
@ -6,7 +6,12 @@ setup() {
|
|||||||
|
|
||||||
@test "task: #Pull" {
|
@test "task: #Pull" {
|
||||||
cd "$TESTDIR"/tasks/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" {
|
@test "task: #ReadFile" {
|
||||||
@ -39,4 +44,4 @@ setup() {
|
|||||||
|
|
||||||
"$DAGGER" --europa up ./user.cue
|
"$DAGGER" --europa up ./user.cue
|
||||||
"$DAGGER" --europa up ./workdir.cue
|
"$DAGGER" --europa up ./workdir.cue
|
||||||
}
|
}
|
||||||
|
18
tests/tasks/pull/pull_auth.cue
Normal file
18
tests/tasks/pull/pull_auth.cue
Normal 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"]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user