Rename tests with new naming convention and update tests lists

Signed-off-by: Tom Chauveau <tom.chauveau@epitech.eu>
This commit is contained in:
Tom Chauveau
2021-04-24 22:33:52 +02:00
parent a9189392b9
commit e366773dc0
25 changed files with 152 additions and 142 deletions

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test1: {
TestCacheCopyLoadAlpine: {
string
#up: [
@@ -25,7 +25,7 @@ test1: {
]
}
test2: {
TestCacheCopy: {
string
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
component: #up: [
TestComponent: #up: [
op.#FetchContainer & {
ref: "alpine"
},
@@ -13,7 +13,7 @@ component: #up: [
},
]
test1: {
TestComponentCopy: {
string
#up: [
@@ -21,7 +21,7 @@ test1: {
ref: "busybox"
},
op.#Copy & {
from: component
from: TestComponent
src: "/id"
dest: "/"
},
@@ -32,7 +32,7 @@ test1: {
]
}
test2: {
TestNestedCopy: {
string
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestScriptCopy: {
string
#up: [

View File

@@ -1,4 +1,4 @@
package test
package testing
import (
"dagger.io/dagger"

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportBool: {
bool
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test1: {
TestExportConcurrency1: {
string
#up: [
@@ -11,7 +11,7 @@ test1: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol1 > /tmp/out
echo -n lol1 > /tmp/out
"""]
dir: "/"
always: true
@@ -23,7 +23,7 @@ test1: {
]
}
test2: {
TestExportConcurrency2: {
string
#up: [
@@ -32,7 +32,7 @@ test2: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol2 > /tmp/out
echo -n lol2 > /tmp/out
"""]
dir: "/"
always: true
@@ -44,7 +44,7 @@ test2: {
]
}
test3: {
TestExportConcurrency3: {
string
#up: [
@@ -53,7 +53,7 @@ test3: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol3 > /tmp/out
echo -n lol3 > /tmp/out
"""]
dir: "/"
always: true
@@ -65,7 +65,7 @@ test3: {
]
}
test4: {
TestExportConcurrency4: {
string
#up: [
@@ -74,7 +74,7 @@ test4: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol4 > /tmp/out
echo -n lol4 > /tmp/out
"""]
dir: "/"
always: true
@@ -86,7 +86,7 @@ test4: {
]
}
test5: {
TestExportConcurrency5: {
string
#up: [
@@ -95,7 +95,7 @@ test5: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol5 > /tmp/out
echo -n lol5 > /tmp/out
"""]
always: true
},
@@ -106,7 +106,7 @@ test5: {
]
}
test6: {
TestExportConcurrency6: {
string
#up: [
@@ -115,7 +115,7 @@ test6: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol6 > /tmp/out
echo -n lol6 > /tmp/out
"""]
always: true
},
@@ -126,7 +126,7 @@ test6: {
]
}
test7: {
TestExportConcurrency7: {
string
#up: [
@@ -135,7 +135,7 @@ test7: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol7 > /tmp/out
echo -n lol7 > /tmp/out
"""]
always: true
},
@@ -146,7 +146,7 @@ test7: {
]
}
test8: {
TestExportConcurrency8: {
string
#up: [
@@ -155,7 +155,7 @@ test8: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol8 > /tmp/out
echo -n lol8 > /tmp/out
"""]
dir: "/"
always: true
@@ -167,7 +167,7 @@ test8: {
]
}
test9: {
TestExportConcurrency9: {
string
#up: [
@@ -176,7 +176,7 @@ test9: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol9 > /tmp/out
echo -n lol9 > /tmp/out
"""]
dir: "/"
always: true
@@ -188,7 +188,7 @@ test9: {
]
}
test10: {
TestExportConcurrency10: {
string
#up: [
@@ -197,7 +197,7 @@ test10: {
},
op.#Exec & {
args: ["sh", "-c", """
echo lol10 > /tmp/out
echo -n lol10 > /tmp/out
"""]
dir: "/"
always: true

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportFloat: {
float
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
teststring: {
TestExportInvalidFormat: {
string
#up: [

View File

@@ -1,6 +1,6 @@
package testing
teststring: {
TestExportInvalidPath: {
string
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportInvalidValidation: {
string
=~"^NAAAA.+"
@@ -12,7 +12,7 @@ test: {
},
op.#Exec & {
args: ["sh", "-c", """
printf something > /tmp/out
echo -n something > /tmp/out
""",
]
},

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
testScalar: {
TestExportScalar: {
bool
#up: [
@@ -23,7 +23,7 @@ testScalar: {
]
}
testMap: #up: [
TestExportMap: #up: [
op.#FetchContainer & {
ref: "alpine"
},
@@ -40,28 +40,27 @@ testMap: #up: [
},
]
// FIXME: lists are currently broken
// testList: {
// [...string]
TestExportList: {
[...string]
// #up: [
// {
// do: "fetch-container"
// ref: "alpine"
// },
// {
// do: "exec"
// args: ["sh", "-c", """
// echo '["milk", "pumpkin pie", "eggs", "juice"]' > /tmp/out
// """,
// ]
// dir: "/"
// },
// {
// do: "export"
// // Source path in the container
// source: "/tmp/out"
// format: "json"
// },
// ]
// }
#up: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "exec"
args: ["sh", "-c", """
echo '["milk", "pumpkin pie", "eggs", "juice"]' > /tmp/out
""",
]
dir: "/"
},
{
do: "export"
// Source path in the container
source: "/tmp/out"
format: "json"
},
]
}

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportNumber: {
number
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportString: {
string
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestExportStringValidation: {
string
=~"^some.+"

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
testScalar: {
TestExportScalar: {
bool
#up: [
@@ -23,35 +23,34 @@ testScalar: {
]
}
// FIXME: lists are currently broken
// testList: {
// [...string]
TestExportList: {
[...string]
// #up: [
// {
// do: "fetch-container"
// ref: "alpine"
// },
// {
// do: "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"
// // Source path in the container
// source: "/tmp/out"
// format: "yaml"
// },
// ]
// }
#up: [
{
do: "fetch-container"
ref: "alpine"
},
{
do: "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"
// Source path in the container
source: "/tmp/out"
format: "yaml"
},
]
}
testMap: #up: [
TestExportMap: #up: [
{
do: "fetch-container"
ref: "alpine"

View File

@@ -2,31 +2,31 @@ package testing
import "dagger.io/dagger/op"
busybox1: #up: [
TestBusybox1: #up: [
op.#FetchContainer & {
ref: "busybox"
},
]
busybox2: #up: [
TestBusybox2: #up: [
op.#FetchContainer & {
ref: "busybox:latest"
},
]
busybox3: #up: [
TestBusybox3: #up: [
op.#FetchContainer & {
ref: "busybox:1.33-musl"
},
]
busybox4: #up: [
TestBusybox4: #up: [
op.#FetchContainer & {
ref: "busybox@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},
]
busybox5: #up: [
TestBusybox5: #up: [
op.#FetchContainer & {
ref: "busybox:1.33-musl@sha256:e2af53705b841ace3ab3a44998663d4251d33ee8a9acaf71b66df4ae01c3bbe7"
},

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
component: #up: [
TestComponent: #up: [
op.#FetchContainer & {
ref: "alpine"
},
@@ -13,12 +13,12 @@ component: #up: [
},
]
test1: {
TestComponentLoad: {
string
#up: [
op.#Load & {
from: component
from: TestComponent
},
op.#Export & {
source: "/id"
@@ -27,7 +27,7 @@ test1: {
]
}
test2: {
TestNestedLoad: {
string
#up: [

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestMountCache: {
string
#up: [
@@ -11,7 +11,7 @@ test: {
},
op.#Exec & {
args: ["sh", "-c", """
echo "NOT SURE WHAT TO TEST YET" > /out
echo -n "NOT SURE WHAT TO TEST YET" > /out
"""]
dir: "/"
mount: something: "cache"

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestInvalidMountPath: {
string
#up: [
@@ -18,7 +18,7 @@ test: {
ls -lA /lol > /out
"""]
mount: something: {
input: [{
from: [{
do: "fetch-container"
ref: "alpine"
}]

View File

@@ -2,7 +2,7 @@ package testing
import "dagger.io/dagger/op"
test: {
TestMountTmpfs: {
string
#up: [
@@ -15,8 +15,8 @@ test: {
},
op.#Exec & {
args: ["sh", "-c", """
echo ok > /out
echo ok > /tmpdir/out
echo -n ok > /out
echo -n ok > /tmpdir/out
"""]
mount: "/tmpdir": "tmpfs"
},

View File

@@ -1,4 +1,4 @@
package main
package testing
import (
"dagger.io/dagger/op"

View File

@@ -1,8 +1,8 @@
package main
package testing
import "dagger.io/dagger/op"
hello: {
TestInvalidExecSubdir: {
string
#up: [

View File

@@ -1,8 +1,8 @@
package main
package testing
import "dagger.io/dagger/op"
hello: {
TestSimpleSubdir: {
string
#up: [