feat(config): some additional config options, and config migration from deprecated keys
This commit is contained in:
parent
629358a81b
commit
4e78cefd56
16 changed files with 363 additions and 51 deletions
22
testdata/config-init.ct
vendored
22
testdata/config-init.ct
vendored
|
|
@ -1,10 +1,30 @@
|
|||
# Init creates a config file
|
||||
$ pda config init
|
||||
ok generated config: /tmp/TestMain2533282848/002/config.toml
|
||||
|
||||
# Second init fails
|
||||
$ pda config init --> FAIL
|
||||
FAIL config file already exists
|
||||
hint use 'pda config edit' or 'pda config init --new'
|
||||
hint use '--update' to update your config, or '--new' to get a fresh copy
|
||||
|
||||
# Init --new overwrites
|
||||
$ pda config init --new
|
||||
ok generated config: /tmp/TestMain2533282848/002/config.toml
|
||||
|
||||
# --update preserves user changes
|
||||
$ pda config set list.always_show_all_stores false
|
||||
$ pda config get list.always_show_all_stores
|
||||
ok list.always_show_all_stores set to 'false'
|
||||
false
|
||||
$ pda config init --update
|
||||
$ pda config get list.always_show_all_stores
|
||||
ok updated config: /tmp/TestMain2533282848/002/config.toml
|
||||
false
|
||||
|
||||
# --new and --update are mutually exclusive
|
||||
$ pda config init --new --update --> FAIL
|
||||
FAIL --new and --update are mutually exclusive
|
||||
|
||||
# Reset for other tests
|
||||
$ pda config init --new
|
||||
ok generated config: /tmp/TestMain2533282848/002/config.toml
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue