Commit 3430eec
committed
Allow overriding config values via environment variables
Configuration values can now be overridden at runtime with
`XCPNG_TESTS_`-prefixed environment variables.
Double underscores separate path segments (e.g.
`XCPNG_TESTS_network__free_nics='["eth1"]'` overrides
`config.network.free_nics`).
Values are parsed as TOML when possible, falling back to
plain strings - so booleans, integers, arrays, and inline
tables work naturally alongside plain string values.
Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@vates.tech>1 parent 83d8d00 commit 3430eec
1 file changed
Lines changed: 26 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
3 | 4 | | |
4 | 5 | | |
5 | 6 | | |
| |||
218 | 219 | | |
219 | 220 | | |
220 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
221 | 246 | | |
222 | 247 | | |
223 | 248 | | |
| |||
249 | 274 | | |
250 | 275 | | |
251 | 276 | | |
| 277 | + | |
252 | 278 | | |
253 | 279 | | |
254 | 280 | | |
| |||
0 commit comments