Commit ef7ae50
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 5f93fa3 commit ef7ae50
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 | | |
| |||
223 | 224 | | |
224 | 225 | | |
225 | 226 | | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
| 234 | + | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
226 | 251 | | |
227 | 252 | | |
228 | 253 | | |
| |||
254 | 279 | | |
255 | 280 | | |
256 | 281 | | |
| 282 | + | |
257 | 283 | | |
258 | 284 | | |
259 | 285 | | |
| |||
0 commit comments