Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
tests(ci-broker.md): update acceptance criteria for new CI events
Lars Wirzenius committed 1 year ago
commit 31e930aecfdab902f2d5b6829bf1105b8344a7e8
parent 41375b8bb628048d90601781b5999b85ed85c441
1 file changed +19 -19
modified ci-broker.md
@@ -670,9 +670,10 @@ when I try to run bash radenv.sh env RAD_SOCKET=synt.sock cib --config broker.ya
then command is successful

when I run cibtool --db ci-broker.db event list --json
-
then stdout contains "RefChanged"
-
then stdout contains ""oid": "0000000000000000000000000000000000000000""
-
then stdout contains ""old": "0000000000000000000000000000000000000000""
+
then stdout contains "BranchUpdated"
+
then stdout contains ""branch": "main""
+
then stdout contains ""tip": "0000000000000000000000000000000000000000""
+
then stdout contains ""old_tip": "0000000000000000000000000000000000000000""
~~~

## Insert many events into queue
@@ -1151,15 +1152,14 @@ when I run bash radenv.sh cibtool event record --output events.json
then file events.json contains ""type":"refsFetched""
~~~

-
## Convert recorded node events into broker events
+
## Convert recorded node events into CI events

-
_What:_ Node operator can see what broke events are created from node
+
_What:_ Node operator can see what CI events are created from node
events.

-
_Why:_ This is helpful so that node operators can see what broker
-
events are created from node events, which may have been previously
-
recorded. It's also helpful for CI broker developers as a development
-
tool.
+
_Why:_ This is helpful so that node operators can see what CI events
+
are created from node events, which may have been previously recorded.
+
It's also helpful for CI broker developers as a development tool.

_Who:_ `cib-dev`, `node-ops`

@@ -1176,18 +1176,18 @@ when I run synthetic-events synt.sock refsfetched.json --log log.txt

given an installed cibtool
when I run bash radenv.sh cibtool event record --output node-events.json
-
when I run bash radenv.sh cibtool event broker --output broker-events.json node-events.json
-
then file broker-events.json contains "RefChanged""
+
when I run bash radenv.sh cibtool event ci --output ci-events.json node-events.json
+
when I run cat ci-events.json
+
then file ci-events.json contains "BranchUpdated""
~~~


-
## Filter recorded broker events
+
## Filter recorded CI events

-
_What:_ Node operator can see what broker events an event filter
-
allow.
+
_What:_ Node operator can see what CI events an event filter allows.

_Why:_ This is helpful so that node operators can see verify their
-
event filter works as they expect.
+
event filters work as they expect.

_Who:_ `cib-dev`, `node-ops`

@@ -1204,14 +1204,14 @@ when I run synthetic-events synt.sock refsfetched.json --log log.txt

given an installed cibtool
when I run bash radenv.sh cibtool event record --output node-events.json
-
when I run bash radenv.sh cibtool event broker --output broker-events.json node-events.json
+
when I run bash radenv.sh cibtool event ci --output ci-events.json node-events.json

given file allow.yaml
-
when I run cibtool event filter  allow.yaml broker-events.json
-
then stdout contains "RefChanged"
+
when I run cibtool event filter  allow.yaml ci-events.json
+
then stdout contains "BranchUpdated"

given file deny.yaml
-
when I run cibtool event filter deny.yaml broker-events.json
+
when I run cibtool event filter deny.yaml ci-events.json
then stdout is exactly ""
~~~