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:
Christian Kellner 2021-04-28 14:14:36 +00:00
parent a05a8aaed6
commit e97285e00a
10 changed files with 34 additions and 0 deletions

View file

@ -0,0 +1,6 @@
{
"expects": "success",
"org.osbuild.ostree": {
"items": {}
}
}

View file

@ -0,0 +1,12 @@
{
"expects": "error",
"org.osbuild.ostree": {
"items": {
"sha256:bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb": {
"remote": {
"url": "http://localhost/sources/org.osbuild.curl/data/missing"
}
}
}
}
}

View file

@ -0,0 +1,12 @@
{
"expects": "success",
"org.osbuild.ostree": {
"items": {
"d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8": {
"remote": {
"url": "http://localhost/sources/org.osbuild.ostree/data/repo"
}
}
}
}
}

View file

@ -0,0 +1,3 @@
[core]
repo_version=1
mode=archive-z2

View file

@ -0,0 +1 @@
d6243b0d0ca3dc2aaef2e0eb3e9f1f4836512c2921007f124b285f7c466464d8