test(get): secret data

This commit is contained in:
Lewis Wynne 2025-11-20 14:42:07 +00:00
parent e710501d91
commit f24865eab4
8 changed files with 79 additions and 0 deletions

15
testdata/get__secret__err.ct vendored Normal file
View file

@ -0,0 +1,15 @@
$ pda set a b --secret
$ pda get a --> FAIL
Error: "a" is marked secret; re-run with --secret to display it
Usage:
pda get KEY[@DB] [flags]
Aliases:
get, g
Flags:
-h, --help help for get
-b, --include-binary include binary data in text output
--no-template directly output template syntax
-c, --run execute the result as a shell command
--secret display values marked as secret

View file

@ -0,0 +1,16 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --include-binary --> FAIL
Error: "a" is marked secret; re-run with --secret to display it
Usage:
pda get KEY[@DB] [flags]
Aliases:
get, g
Flags:
-h, --help help for get
-b, --include-binary include binary data in text output
--no-template directly output template syntax
-c, --run execute the result as a shell command
--secret display values marked as secret

View file

@ -0,0 +1,16 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --include-binary --run --> FAIL
Error: "a" is marked secret; re-run with --secret to display it
Usage:
pda get KEY[@DB] [flags]
Aliases:
get, g
Flags:
-h, --help help for get
-b, --include-binary include binary data in text output
--no-template directly output template syntax
-c, --run execute the result as a shell command
--secret display values marked as secret

16
testdata/get__secret__err__with__run.ct vendored Normal file
View file

@ -0,0 +1,16 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --run --> FAIL
Error: "a" is marked secret; re-run with --secret to display it
Usage:
pda get KEY[@DB] [flags]
Aliases:
get, g
Flags:
-h, --help help for get
-b, --include-binary include binary data in text output
--no-template directly output template syntax
-c, --run execute the result as a shell command
--secret display values marked as secret

View file

@ -0,0 +1,4 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --secret --run --include-binary
hello world

View file

@ -0,0 +1,4 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --include-binary --secret
echo hello world

View file

@ -0,0 +1,4 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --run --secret
hello world

View file

@ -0,0 +1,4 @@
$ fecho cmd echo hello world
$ pda set a --secret < cmd
$ pda get a --secret
echo hello world