Radish alpha
r
Radicle CI broker
Radicle
Git (anonymous pull)
Log in to clone via SSH
test(ci-broker.md): verify event filter Deny
Lars Wirzenius committed 1 year ago
commit 28ee4580e06e6761d7f7b8cbc840fcf49aeff82f
parent 568592aabc3b42df44781a63782ce1336ddf5639
1 file changed +34 -0
modified ci-broker.md
@@ -1014,6 +1014,40 @@ triggers:
~~~


+
## Filter predicate `Deny`
+

+
_Want:_ We can allow no events.
+

+
_Why:_ This is for consistency.
+

+
~~~scenario
+
given a Radicle node, with CI configured with broker.yaml and adapter dummy.sh
+
given a Git repository xyzzy in the Radicle node
+

+
given file config.yaml from filter-deny.yaml
+

+
when I run cibtool --db ci-broker.db event add --repo xyzzy --ref main --commit HEAD --kind branch-deleted
+
when I run cibtool --db ci-broker.db event add --repo xyzzy --ref oksa --commit HEAD --kind branch-created
+

+
when I run ./env.sh cib --config config.yaml queued
+

+
when I run cibtool --db ci-broker.db run list --json
+
then stdout doesn't contain "main"
+
then stdout doesn't contain "oksa"
+
~~~
+

+
~~~{#filter-deny.yaml .file .json}
+
db: ci-broker.db
+
adapters:
+
  default:
+
    command: ./adapter.sh
+
triggers:
+
  - adapter: default
+
    filters:
+
      - !Deny
+
~~~
+

+

# Acceptance criteria for test tooling

The event synthesizer is a helper to feed the CI broker node events in