Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
fix(ci-broker.md): fix scenarios to use new cibtool CLI
Lars Wirzenius committed 1 year ago
commit 1e9f6c146d1dd6cd8e31f9451a4c583b3da92fcd
parent 5676cf8607f0f7616c2fac4b95a9654f70247f0b
1 file changed +33 -14
modified ci-broker.md
@@ -454,18 +454,17 @@ given file setup-node.sh
when I run bash radenv.sh bash setup-node.sh

given an installed cibtool
-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --failure --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --repo testy --branch main --commit HEAD --failure

given a directory reports
when I run bash radenv.sh cibtool --db x.db report --output-dir reports

then file reports/index.html exists
-
then file reports/index.html contains "zwTxygwuz5LDGBq255RA2CbNGrz8"
-

-
then file reports/zwTxygwuz5LDGBq255RA2CbNGrz8.html exists
-
then file reports/zwTxygwuz5LDGBq255RA2CbNGrz8.html contains "success"
+
then file reports/index.html contains "testy"
~~~

+
This doesn't check that there is a per-repository HTML file, because
+
we have not convenient way to know the repository ID.

# Acceptance criteria for test tooling

@@ -883,13 +882,17 @@ _Why:_ This is primarily needed for testing.
_Who:_ `cib-devs`

~~~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 run cibtool --db x.db run list
then stdout is exactly ""

-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --triggered --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --id xyzzy --repo testy --branch main --commit main --triggered
when I run cibtool --db x.db run list --json
-
then stdout contains "rad:zwTxygwuz5LDGBq255RA2CbNGrz8"
+
then stdout contains "xyzzy"
then stdout contains ""state": "triggered""
~~~

@@ -902,13 +905,17 @@ _Why:_ This is primarily needed for testing.
_Who:_ `cib-dev`.

~~~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 run cibtool --db x.db run list
then stdout is exactly ""

-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --running --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --repo testy --url https://x/1 --branch main --commit HEAD --running
when I run cibtool --db x.db run list --json
-
then stdout contains "rad:zwTxygwuz5LDGBq255RA2CbNGrz8"
+
then stdout contains ""repo_name": "testy""
then stdout contains ""state": "running""
~~~

@@ -923,15 +930,19 @@ _Why:_ This is primarily needed for testing.
_Who:_ `cib-dev`.

~~~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 run cibtool --db x.db run list
then stdout is exactly ""

-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --success --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --id xyzzy --repo testy --branch main --commit HEAD --success
when I run cibtool --db x.db run list --json
then stdout contains ""state": "finished""
then stdout contains ""result": "success""
-
then stdout contains "rad:zwTxygwuz5LDGBq255RA2CbNGrz8"
+
then stdout contains "xyzzy"
~~~


@@ -944,15 +955,19 @@ _Why:_ This is primarily needed for testing.
_Who:_ `cib-dev`.

~~~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 run cibtool --db x.db run list
then stdout is exactly ""

-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --failure --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --id xyzzy --repo testy --branch main --commit HEAD --failure
when I run cibtool --db x.db run list --json
then stdout contains ""state": "finished""
then stdout contains ""result": "failure""
-
then stdout contains "rad:zwTxygwuz5LDGBq255RA2CbNGrz8"
+
then stdout contains "xyzzy"

when I run cibtool --db x.db run list --adapter-run-id abracadabra
then stdout is exactly ""
@@ -967,11 +982,15 @@ _Why:_ This is primarily needed for testing.
_Who:_ `cib-dev`.

~~~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 run cibtool --db x.db run list
then stdout is exactly ""

-
when I run cibtool --db x.db run add --id x --repo rad:zwTxygwuz5LDGBq255RA2CbNGrz8 --alias x --url https://x/1 --branch main --commit f1815dde6ae406d8fe3cec0b96c4486766342716 --who x --triggered --timestamp 2024-07-09T02:00:00
+
when I run bash radenv.sh cibtool --db x.db run add --id x --repo testy --branch main --commit HEAD --triggered
when I run cibtool --db x.db run list
then stdout has one line
when I run cibtool --db x.db run show x