From acd3dd068ef2ca0d1f6f69beaf5b82cb99db0a8a Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 24 Sep 2025 07:48:07 +0300 Subject: [PATCH] test: add scenario that uses all event filters in config file This makes it more obvious if we miss support for a filter. --- ci-broker.md | 47 ++++++++++++++++++++++++++++++++--------------- 1 file changed, 32 insertions(+), 15 deletions(-) diff --git a/ci-broker.md b/ci-broker.md index c732d67f..e5fc80d3 100644 --- a/ci-broker.md +++ b/ci-broker.md @@ -64,6 +64,23 @@ filters: db: ci-broker.db report_dir: reports queue_len_interval: 1min +adapters: + mcadapterface: + command: ./adapter.sh + env: + RADICLE_NATIVE_CI: native-ci.yaml + sensitive_env: + API_KEY: xyzzy +triggers: + - adapter: mcadapterface + filters: + - !Branch "main" +~~~ + +~~~{#broker-with-all-filter-kinds.yaml .file .yaml} +db: ci-broker.db +report_dir: reports +queue_len_interval: 1min adapters: mcadapterface: command: ./adapter.sh @@ -84,19 +101,19 @@ triggers: - BranchCreated - !Not - BranchDeleted - - BranchUpdated - - TagCreated - - TagDeleted - - TagUpdated - - Branch - - DefaultBranch - - Deny - - HasFile - - Node - - PatchCreated - - PatchUpdated - - Patch - - Repository + - !BranchUpdated + - !TagCreated + - !TagDeleted + - !TagUpdated + - !Branch "a2dec1a5b3ab5b34cea16c07b632023d9ce535fc" + - !DefaultBranch + - !Deny + - !HasFile "xyzzy" + - !Node "z6MkgEMYod7Hxfy9qCvDv5hYHkZ4ciWmLFgfvm3Wn1b2w2FV" + - !PatchCreated + - !PatchUpdated + - !Patch "a2dec1a5b3ab5b34cea16c07b632023d9ce535fc" + - !Repository "rad:zwTxygwuz5LDGBq255RA2CbNGrz8" ~~~ ~~~{#broker-with-concurrent-adapters.yaml .file .yaml} @@ -418,8 +435,8 @@ output is in the JSON format. It does not try to make sure the JSON matches the YAML semantically. ~~~scenario -given a Radicle node, with CI configured with broker-with-concurrent-adapters.yaml and adapter dummy.sh -when I run cib --config broker-with-concurrent-adapters.yaml config --output actual.json +given a Radicle node, with CI configured with broker-with-all-filter-kinds.yaml and adapter dummy.sh +when I run cib --config broker-with-all-filter-kinds.yaml config --output actual.json when I run jq . actual.json then command is successful ~~~