Add new Client API
Signed-off-by: Helder Correia <174525+helderco@users.noreply.github.com>
This commit is contained in:
11
tests/plan/client/filesystem/read/fs/not_exists/test.cue
Normal file
11
tests/plan/client/filesystem/read/fs/not_exists/test.cue
Normal file
@@ -0,0 +1,11 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "/foobar": read: contents: dagger.#FS
|
||||
actions: test: {
|
||||
}
|
||||
}
|
22
tests/plan/client/filesystem/read/fs/relative/test.cue
Normal file
22
tests/plan/client/filesystem/read/fs/relative/test.cue
Normal file
@@ -0,0 +1,22 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: "../rootfs": read: {
|
||||
contents: dagger.#FS
|
||||
include: ["*.txt"]
|
||||
}
|
||||
actions: test: {
|
||||
[string]: dagger.#ReadFile & {
|
||||
input: client.filesystem."../rootfs".read.contents
|
||||
}
|
||||
valid: {
|
||||
path: "test.txt"
|
||||
contents: "local directory"
|
||||
}
|
||||
notIncluded: path: "test.log"
|
||||
}
|
||||
}
|
1
tests/plan/client/filesystem/read/fs/rootfs/test.log
Normal file
1
tests/plan/client/filesystem/read/fs/rootfs/test.log
Normal file
@@ -0,0 +1 @@
|
||||
excluded
|
1
tests/plan/client/filesystem/read/fs/rootfs/test.txt
Normal file
1
tests/plan/client/filesystem/read/fs/rootfs/test.txt
Normal file
@@ -0,0 +1 @@
|
||||
local directory
|
27
tests/plan/client/filesystem/read/fs/usage/test.cue
Normal file
27
tests/plan/client/filesystem/read/fs/usage/test.cue
Normal file
@@ -0,0 +1,27 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"dagger.io/dagger"
|
||||
)
|
||||
|
||||
dagger.#Plan & {
|
||||
client: filesystem: rootfs: read: {
|
||||
contents: dagger.#FS
|
||||
exclude: ["*.log"]
|
||||
}
|
||||
actions: test: {
|
||||
[string]: dagger.#ReadFile & {
|
||||
input: client.filesystem.rootfs.read.contents
|
||||
}
|
||||
valid: {
|
||||
path: "test.txt"
|
||||
contents: "local directory"
|
||||
}
|
||||
conflictingValues: {
|
||||
path: "test.txt"
|
||||
contents: "local foobar"
|
||||
}
|
||||
excluded: path: "test.log"
|
||||
notExists: path: "test.json"
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user