test(set): TTL
This commit is contained in:
parent
f24865eab4
commit
0bc5a9650c
3 changed files with 14 additions and 0 deletions
12
testdata/set__err__with__invalid-ttl.ct
vendored
Normal file
12
testdata/set__err__with__invalid-ttl.ct
vendored
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
$ pda set a b --ttl 3343r --> FAIL
|
||||
Error: invalid argument "3343r" for "-t, --ttl" flag: time: unknown unit "r" in duration "3343r"
|
||||
Usage:
|
||||
pda set KEY[@DB] [VALUE] [flags]
|
||||
|
||||
Aliases:
|
||||
set, s
|
||||
|
||||
Flags:
|
||||
-h, --help help for set
|
||||
--secret Mark the stored value as a secret
|
||||
-t, --ttl duration Expire the key after the provided duration (e.g. 24h, 30m)
|
||||
1
testdata/set__ok__with__secret_ttl.ct
vendored
Normal file
1
testdata/set__ok__with__secret_ttl.ct
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ pda set a b --secret --ttl 10m
|
||||
1
testdata/set__ok__with__ttl.ct
vendored
Normal file
1
testdata/set__ok__with__ttl.ct
vendored
Normal file
|
|
@ -0,0 +1 @@
|
|||
$ pda set a b --ttl 30m
|
||||
Loading…
Add table
Add a link
Reference in a new issue