mirror of
https://code.forgejo.org/forgejo/runner.git
synced 2024-11-24 21:58:46 +03:00
15e328a8a5
Closes: forgejo/runner#162 Reviewed-on: https://code.forgejo.org/forgejo/runner/pulls/195 Reviewed-by: earl-warren <earl-warren@noreply.code.forgejo.org> Co-authored-by: TheFox0x7 <thefox0x7@gmail.com> Co-committed-by: TheFox0x7 <thefox0x7@gmail.com>
24 lines
960 B
Python
24 lines
960 B
Python
import json
|
|
|
|
expectedLabels = {
|
|
"maintainer": "contact@forgejo.org",
|
|
"org.opencontainers.image.authors": "Forgejo",
|
|
"org.opencontainers.image.url": "https://forgejo.org",
|
|
"org.opencontainers.image.documentation": "https://forgejo.org/docs/latest/admin/actions/#forgejo-runner",
|
|
"org.opencontainers.image.source": "https://code.forgejo.org/forgejo/runner",
|
|
"org.opencontainers.image.version": "1.2.3",
|
|
"org.opencontainers.image.vendor": "Forgejo",
|
|
"org.opencontainers.image.licenses": "MIT",
|
|
"org.opencontainers.image.title": "Forgejo Runner",
|
|
"org.opencontainers.image.description": "A runner for Forgejo Actions.",
|
|
}
|
|
inspect = None
|
|
with open("./labels.json", "r") as f:
|
|
inspect = json.load(f)
|
|
|
|
assert inspect
|
|
labels = inspect[0]["Config"]["Labels"]
|
|
|
|
for k, v in expectedLabels.items():
|
|
assert k in labels, f"'{k}' is missing from labels"
|
|
assert labels[k] == v, f"expected {v} in key {k}, found {labels[k]}"
|