implemented services unix and npipe complete with test
Signed-off-by: Richard Jones <richard@dagger.io>
This commit is contained in:
@@ -7,6 +7,12 @@ setup() {
|
||||
@test "plan: hello" {
|
||||
# Europa loader handles the cwd differently, therefore we need to CD into the tree at or below the parent of cue.mod
|
||||
cd "$TESTDIR"
|
||||
run "$DAGGER" --europa up ./plan/hello-europa
|
||||
assert_success
|
||||
"$DAGGER" --europa up ./plan/hello-europa
|
||||
}
|
||||
|
||||
@test "plan: unix socket" {
|
||||
cd "$TESTDIR"
|
||||
"$DAGGER" --europa up ./plan/hello-europa
|
||||
run curl http://localhost:8080
|
||||
assert_output --partial "<title>Hello World</title>"
|
||||
}
|
16
tests/plan/context/services/unix/main.cue
Normal file
16
tests/plan/context/services/unix/main.cue
Normal file
@@ -0,0 +1,16 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"alpha.dagger.io/dagger/engine"
|
||||
"alpha.dagger.io/docker"
|
||||
)
|
||||
|
||||
engine.#Plan & {
|
||||
context: services: dockerSocket: unix: "/var/run/docker.sock"
|
||||
actions: nginx: docker.#Run & {
|
||||
ref: "nginxdemos/nginx-hello"
|
||||
name: "nginx-hello"
|
||||
ports: ["8080:8080"]
|
||||
socket: context.services.dockerSocket.service
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user