ported FetchHTTP to HTTPFetch

Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
Richard Jones
2021-12-22 16:56:45 -07:00
parent deee606f4e
commit 643d93c35d
5 changed files with 105 additions and 3 deletions

View File

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

View 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"
}
}

View 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"
}
}