test: Add skopeo tests
There is a source test that installs a pre-build, embeded image file and ensure all the right files are installed. This uses the vfs driver because then it works everywhere, including the CI (which doesn't do overlayfs). Then the is a source test that downloads a minimal image from a faked registry on localhost. For the registy API to work the "/v2" entry-point in the webserver has to be at the root, so there is a symlink in test/data: v2 -> sources/org.osbuild.skopeo/data/v2 But otherwise the data is localized to sources/org.osbuild.skopeo.
This commit is contained in:
parent
693e44e412
commit
13c0c1e59e
15 changed files with 1592 additions and 0 deletions
6
test/data/sources/org.osbuild.skopeo/cases/empty.json
Normal file
6
test/data/sources/org.osbuild.skopeo/cases/empty.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"expects": "success",
|
||||
"org.osbuild.skopeo": {
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"expects": "error",
|
||||
"org.osbuild.skopeo": {
|
||||
"items": {
|
||||
"sha256:aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa": {
|
||||
"image": {
|
||||
"name": "localhost/osbuild/hello",
|
||||
"digest": "sha256:a606d2a723b78633e33932fdc201ec3546c4cf1887fb45f8d3198dde7a39b3f4",
|
||||
"tls-verify": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"expects": "error",
|
||||
"org.osbuild.skopeo": {
|
||||
"items": {
|
||||
"sha256:805e972fbc4dfa74a616dcaafe0d9e9b4c548b8909b14ffb032aa20fa23d9ad6": {
|
||||
"image": {
|
||||
"name": "localhost/osbuild/wrong",
|
||||
"digest": "sha256:a606d2a723b78633e33932fdc201ec3546c4cf1887fb45f8d3198dde7a39b3f4",
|
||||
"tls-verify": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
14
test/data/sources/org.osbuild.skopeo/cases/success.json
Normal file
14
test/data/sources/org.osbuild.skopeo/cases/success.json
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
{
|
||||
"expects": "success",
|
||||
"org.osbuild.skopeo": {
|
||||
"items": {
|
||||
"sha256:805e972fbc4dfa74a616dcaafe0d9e9b4c548b8909b14ffb032aa20fa23d9ad6": {
|
||||
"image": {
|
||||
"name": "localhost/osbuild/hello",
|
||||
"digest": "sha256:a606d2a723b78633e33932fdc201ec3546c4cf1887fb45f8d3198dde7a39b3f4",
|
||||
"tls-verify": false
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
{"created":"2022-02-02T09:04:02.049496094Z","architecture":"amd64","os":"linux","config":{"Env":["PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"],"Labels":{"io.buildah.version":"1.23.1"}},"rootfs":{"type":"layers","diff_ids":["sha256:0da97f9fb353a8d6285145bc7a1b75a28652e80f60ab7479bf5b4ae67ffa37e8"]},"history":[{"created":"2022-02-02T09:04:02.050044248Z","created_by":"/bin/sh -c #(nop) COPY file:ac7ec5eb9477808d410f8800080ebdc3aaa81212a142cb9002e7eb4ae8610cd0 in / "}]}
|
||||
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
{"schemaVersion":2,"mediaType":"application/vnd.docker.distribution.manifest.v2+json","config":{"mediaType":"application/vnd.docker.container.image.v1+json","size":493,"digest":"sha256:805e972fbc4dfa74a616dcaafe0d9e9b4c548b8909b14ffb032aa20fa23d9ad6"},"layers":[{"mediaType":"application/vnd.docker.image.rootfs.diff.tar.gzip","size":134,"digest":"sha256:e2f43980f5c62d8424c6fd14bb32320c6b34518ff6f1445a5c23e036e55391c7"}]}
|
||||
|
|
@ -0,0 +1 @@
|
|||
application/vnd.docker.distribution.manifest.v2+json
|
||||
Loading…
Add table
Add a link
Reference in a new issue