tests: convert tests to new style

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-10-20 12:03:22 -07:00
parent c08f619b02
commit d763976ea9
13 changed files with 79 additions and 104 deletions

View File

@@ -44,20 +44,16 @@ TestExportList: {
[...string]
#up: [
{
do: "fetch-container"
op.#FetchContainer & {
ref: "alpine"
},
{
do: "exec"
op.#Exec & {
args: ["sh", "-c", """
echo '["milk", "pumpkin pie", "eggs", "juice"]' > /tmp/out
""",
]
dir: "/"
},
{
do: "export"
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "json"

View File

@@ -27,22 +27,17 @@ TestExportList: {
[...string]
#up: [
{
do: "fetch-container"
op.#FetchContainer & {
ref: "alpine"
},
{
do: "exec"
op.#Exec & {
args: ["sh", "-c", """
echo "--- # Shopping list
[milk, pumpkin pie, eggs, juice]" > /tmp/out
""",
]
// XXX Blocked by https://github.com/blocklayerhq/dagger/issues/19
dir: "/"
},
{
do: "export"
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "yaml"
@@ -51,19 +46,16 @@ TestExportList: {
}
TestExportMap: #up: [
{
do: "fetch-container"
op.#FetchContainer & {
ref: "alpine"
},
{
do: "exec"
op.#Exec & {
args: ["sh", "-c", """
echo something: something > /tmp/out
""",
]
},
{
do: "export"
op.#Export & {
// Source path in the container
source: "/tmp/out"
format: "yaml"