|
17 | 17 | nodeIdentifier: "helm-mock-1-validator" |
18 | 18 | validatorPartyHint: "helm-mock-1" |
19 | 19 | validatorWalletUser: "mock-wallet-user-id" |
20 | | - scanAddress: "trusted.scan.mock.com" |
21 | 20 | spliceInstanceNames: |
22 | 21 | networkName: MockNet |
23 | 22 | networkFaviconUrl: https://mock.net/favicon.ico |
@@ -126,3 +125,99 @@ tests: |
126 | 125 | value: ledger-api-user |
127 | 126 | - exists: |
128 | 127 | path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_DISABLE_AUTH')].value |
| 128 | + |
| 129 | + - it: "configures scan-client for trust-single mode" |
| 130 | + set: |
| 131 | + scanClient: |
| 132 | + scanType: "trust-single" |
| 133 | + scanAddress: "https://single.scan.url:5004" |
| 134 | + documentSelector: |
| 135 | + path: kind |
| 136 | + value: Deployment |
| 137 | + asserts: |
| 138 | + - matchRegex: |
| 139 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 140 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"trust-single\"" |
| 141 | + - matchRegex: |
| 142 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 143 | + pattern: 'canton.validator-apps.validator_backend.scan-client.url = "https://single.scan.url:5004"' |
| 144 | + |
| 145 | + - it: "configures scan-client for standard bft mode, including multiple seedUrls" |
| 146 | + set: |
| 147 | + scanClient: |
| 148 | + scanType: "bft" |
| 149 | + seedUrls: [ "https://bft-node-1.url:5003", "https://bft-node-2.url:5003" ] |
| 150 | + documentSelector: |
| 151 | + path: kind |
| 152 | + value: Deployment |
| 153 | + asserts: |
| 154 | + - matchRegex: |
| 155 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 156 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"bft\"" |
| 157 | + - matchRegex: |
| 158 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 159 | + pattern: 'canton.validator-apps.validator_backend.scan-client.seed-urls = \["https://bft-node-1.url:5003","https://bft-node-2.url:5003"\]' |
| 160 | + |
| 161 | + - it: "configures scan-client for bft-custom mode, including trustedSvs and threshold" |
| 162 | + set: |
| 163 | + scanClient: |
| 164 | + scanType: "bft-custom" |
| 165 | + seedUrls: [ "https://custom-node-A.com", "https://custom-node-B.com" ] |
| 166 | + trustedSvs: [ "custom-sv-1", "custom-sv-2", "custom-sv-3" ] |
| 167 | + threshold: 2 |
| 168 | + documentSelector: |
| 169 | + path: kind |
| 170 | + value: Deployment |
| 171 | + asserts: |
| 172 | + - matchRegex: |
| 173 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 174 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"bft-custom\"" |
| 175 | + - matchRegex: |
| 176 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 177 | + pattern: 'canton.validator-apps.validator_backend.scan-client.seed-urls = \["https://custom-node-A.com","https://custom-node-B.com"\]' |
| 178 | + - matchRegex: |
| 179 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 180 | + pattern: 'canton.validator-apps.validator_backend.scan-client.trusted-svs = \["custom-sv-1","custom-sv-2","custom-sv-3"\]' |
| 181 | + - matchRegex: |
| 182 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 183 | + pattern: "canton.validator-apps.validator_backend.scan-client.threshold = 2" |
| 184 | + |
| 185 | + - it: "configures scan-client for trust-single when nonSvValidatorTrustSingleScan is true" |
| 186 | + set: |
| 187 | + nonSvValidatorTrustSingleScan: true |
| 188 | + documentSelector: |
| 189 | + path: kind |
| 190 | + value: Deployment |
| 191 | + asserts: |
| 192 | + - matchRegex: |
| 193 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_NON_VALIDATOR_TRUST_SINGLE_SCAN')].value |
| 194 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"trust-single\"" |
| 195 | + |
| 196 | + - it: "defaults to BFT scan client with internal scan address if no config is set" |
| 197 | + set: |
| 198 | + svValidator: false |
| 199 | + documentSelector: |
| 200 | + path: kind |
| 201 | + value: Deployment |
| 202 | + asserts: |
| 203 | + - matchRegex: |
| 204 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 205 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"bft\"" |
| 206 | + - matchRegex: |
| 207 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 208 | + pattern: "canton\\.validator-apps\\.validator_backend\\.scan-client\\.seed-urls = \\[\\s*\\$\\{_scan\\.admin-api\\.address\\}\\s*\\]" |
| 209 | + |
| 210 | + - it: "defaults to BFT scan client when scanType is not specified" |
| 211 | + set: |
| 212 | + scanClient: |
| 213 | + seedUrls: [ "https://custom-node-A.com", "https://custom-node-B.com" ] |
| 214 | + documentSelector: |
| 215 | + path: kind |
| 216 | + value: Deployment |
| 217 | + asserts: |
| 218 | + - matchRegex: |
| 219 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 220 | + pattern: "canton.validator-apps.validator_backend.scan-client.type = \"bft\"" |
| 221 | + - matchRegex: |
| 222 | + path: spec.template.spec.containers[?(@.name=='validator-app')].env[?(@.name=='ADDITIONAL_CONFIG_BFT_SCAN')].value |
| 223 | + pattern: 'canton.validator-apps.validator_backend.scan-client.seed-urls = \["https://custom-node-A.com","https://custom-node-B.com"\]' |
0 commit comments