tests: move llb tests into tests/llb

Signed-off-by: Andrea Luzzardi <aluzzardi@gmail.com>
This commit is contained in:
Andrea Luzzardi
2021-03-31 18:49:53 -07:00
parent e0afc6304d
commit 93296fa358
62 changed files with 59 additions and 71 deletions

45
tests/llb/copy/invalid/cache/main.cue vendored Normal file
View File

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

View File

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