test/sources: add checks for org.osbuild.ostree
Add basic checks for the ostree source, which includes a successful
pull of a commit, an empty source entry and one where the specified
commit is non-existant. For this create a simple commit in a ostree
repo is checked in. The commit was created via:
mkdir "/tmp/data"
echo "Hello World" > /tmp/data/hello.txt
ostree init --repo test/data/sources/org.osbuild.ostree/data/repo \
--mode=archive
ostree commit --repo test/data/sources/org.osbuild.ostree/data/ \
--branch "test/ostree" /tmp/data \
--timestamp="1995-05-13 12:34:56 +0000"
This should give an commit with the following commit id:
d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8
This commit is contained in:
parent
a05a8aaed6
commit
e97285e00a
10 changed files with 34 additions and 0 deletions
6
test/data/sources/org.osbuild.ostree/cases/empty.json
Normal file
6
test/data/sources/org.osbuild.ostree/cases/empty.json
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"expects": "success",
|
||||
"org.osbuild.ostree": {
|
||||
"items": {}
|
||||
}
|
||||
}
|
||||
12
test/data/sources/org.osbuild.ostree/cases/missing_file.json
Normal file
12
test/data/sources/org.osbuild.ostree/cases/missing_file.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"expects": "error",
|
||||
"org.osbuild.ostree": {
|
||||
"items": {
|
||||
"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": {
|
||||
"remote": {
|
||||
"url": "http://localhost/sources/org.osbuild.curl/data/missing"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
12
test/data/sources/org.osbuild.ostree/cases/success.json
Normal file
12
test/data/sources/org.osbuild.ostree/cases/success.json
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"expects": "success",
|
||||
"org.osbuild.ostree": {
|
||||
"items": {
|
||||
"d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8": {
|
||||
"remote": {
|
||||
"url": "http://localhost/sources/org.osbuild.ostree/data/repo"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
0
test/data/sources/org.osbuild.ostree/data/repo/.lock
Normal file
0
test/data/sources/org.osbuild.ostree/data/repo/.lock
Normal file
3
test/data/sources/org.osbuild.ostree/data/repo/config
Normal file
3
test/data/sources/org.osbuild.ostree/data/repo/config
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
[core]
|
||||
repo_version=1
|
||||
mode=archive-z2
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -0,0 +1 @@
|
|||
d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8
|
||||
Loading…
Add table
Add a link
Reference in a new issue