Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
tests(ci-broker.md): verify that cibtool checks repo exists
Lars Wirzenius committed 1 year ago
commit 2c70b462bc3b0abc1f452d747752433eb3465a59
parent 40cb793a547656ddfed9250823b7b603e33e64ab
1 file changed +37 -0
modified ci-broker.md
@@ -1051,6 +1051,43 @@ then stdout contains ""state": "finished""
then stdout contains ""result": "failure""
~~~

+
## Don't insert event for non-existent repository
+

+
_Want:_ `cibtool` won't insert an event to the queue for a repository
+
that isn't in the local node.
+

+
_Why:_ This prevents adding events that can't ever trigger a CI run.
+

+
_Who:_ `cib-devs`
+

+
Note that we verify both lookup by name and by repository ID, and by
+
`cibtool event add` and `cibtool trigger`, to cover all the cases.
+

+
~~~scenario
+
given file radenv.sh
+
given file setup-node.sh
+
when I run bash radenv.sh bash setup-node.sh
+

+
given an installed cibtool
+

+
when I try to run bash radenv.sh cibtool --db x.db event add --repo missing --ref main --commit HEAD --base c0ffee
+
then command fails
+
then stderr contains "missing"
+

+
when I try to run bash radenv.sh cibtool --db x.db event add --repo rad:z3byzFpcfbMJBp4tKYyuuTZiP8WUB --ref main --commit HEAD --base c0ffee
+
then command fails
+
then stderr contains "rad:z3byzFpcfbMJBp4tKYyuuTZiP8WUB"
+

+
when I try to run bash radenv.sh cibtool --db x.db trigger --repo missing --ref main --commit HEAD --id-file id.txt
+
then command fails
+
then stderr contains "missing"
+

+
when I try to run bash radenv.sh cibtool --db x.db trigger --repo rad:z3byzFpcfbMJBp4tKYyuuTZiP8WUB --ref main --commit HEAD --id-file id.txt
+
then command fails
+
then stderr contains "rad:z3byzFpcfbMJBp4tKYyuuTZiP8WUB"
+

+
~~~
+

# Acceptance criteria for logging

The CI broker writes log messages to its standard error output