tests: migrate ops test to bats

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-04-14 16:07:17 -07:00
parent 5582f92a72
commit 381db37ca3
64 changed files with 220 additions and 190 deletions

View File

@@ -0,0 +1,65 @@
package testing
component: #up: [{
do: "fetch-container"
ref: "alpine"
}, {
do: "exec"
args: ["sh", "-c", """
printf lol > /id
"""]
dir: "/"
}]
test1: {
string
#up: [
{
do: "fetch-container"
ref: "busybox"
},
{
do: "copy"
from: component
src: "/id"
dest: "/"
},
{
do: "export"
source: "/id"
format: "string"
},
]
}
test2: {
string
#up: [
{
do: "fetch-container"
ref: "busybox"
},
{
do: "copy"
from: #up: [{
do: "fetch-container"
ref: "alpine"
}, {
do: "exec"
args: ["sh", "-c", """
printf lol > /id
"""]
dir: "/"
}]
src: "/id"
dest: "/"
},
{
do: "export"
source: "/id"
format: "string"
},
]
}

View File

@@ -0,0 +1,23 @@
package testing
test: {
string
#up: [
{
do: "fetch-container"
ref: "busybox"
},
{
do: "copy"
from: [{do: "fetch-container", ref: "alpine"}]
src: "/etc/issue"
dest: "/"
},
{
do: "export"
source: "/issue"
format: "string"
},
]
}