ported FetchHTTP to HTTPFetch
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
@@ -105,6 +105,11 @@ setup() {
|
||||
assert_failure
|
||||
run "$DAGGER" --europa up ./tasks/gitPull/bad_ref.cue
|
||||
assert_failure
|
||||
|
||||
|
||||
}
|
||||
|
||||
@test "task: #HTTPFetch" {
|
||||
cd "$TESTDIR"
|
||||
"$DAGGER" --europa up ./tasks/httpfetch/exist.cue
|
||||
run "$DAGGER" --europa up ./tasks/httpfetch/not_exist.cue
|
||||
assert_failure
|
||||
}
|
||||
|
10
tests/tasks/httpfetch/exist.cue
Normal file
10
tests/tasks/httpfetch/exist.cue
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "alpha.dagger.io/europa/dagger/engine"
|
||||
|
||||
engine.#Plan & {
|
||||
actions: fetch: engine.#HTTPFetch & {
|
||||
source: "https://releases.dagger.io/dagger/latest_version"
|
||||
dest: "/latest.html"
|
||||
}
|
||||
}
|
10
tests/tasks/httpfetch/not_exist.cue
Normal file
10
tests/tasks/httpfetch/not_exist.cue
Normal file
@@ -0,0 +1,10 @@
|
||||
package main
|
||||
|
||||
import "alpha.dagger.io/europa/dagger/engine"
|
||||
|
||||
engine.#Plan & {
|
||||
actions: fetch: engine.#HTTPFetch & {
|
||||
source: "https://releases.dagger.io/dagger/asfgdsfg"
|
||||
dest: "/latest.html"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user