aboutsummaryrefslogtreecommitdiff
path: root/testdata/local/put.data
diff options
context:
space:
mode:
authorShulhan <ms@kilabit.info>2023-09-27 00:01:22 +0700
committerShulhan <ms@kilabit.info>2023-09-27 00:54:10 +0700
commitd1b393b0d4ca75c8d81d051a332597b7aa3f0ab0 (patch)
tree68adc1e0bfee5c6e2056110dc094cb520a5b969a /testdata/local/put.data
parent59968a1665735990187c05547faab3c5310c4be1 (diff)
downloadawwan-d1b393b0d4ca75c8d81d051a332597b7aa3f0ab0.tar.xz
all: make .Vars, .Val, and .Vals panic if values is empty
This is to prevent copying or executing command with value that are not defined or typo which make the result empty and may result in undefined behaviour. For example if we have "app_dir = /data/app" and command in the script that remove that directory recursively, sudo rm -r {{.Val "::app_dir}}/bin will result removing "/bin" entirely.
Diffstat (limited to 'testdata/local/put.data')
-rw-r--r--testdata/local/put.data16
1 files changed, 16 insertions, 0 deletions
diff --git a/testdata/local/put.data b/testdata/local/put.data
new file mode 100644
index 0000000..2018f7a
--- /dev/null
+++ b/testdata/local/put.data
@@ -0,0 +1,16 @@
+<<< tmp/plain.txt
+The host name is encrypt.
+
+
+<<< missing_val_encrypted
+!!! Copy: generateFileInput: template: missing_val_encrypted.txt:2:25: executing "missing_val_encrypted.txt" at <.Val>: error calling Val: "secret::pass" is empty
+
+<<< tmp/decrypted.txt
+The host name is encrypt.
+The secret password is this_is_a_secret.
+
+<<< encrypted_empty_passphrase.stderr
+!!! Copy: generateFileInput: private key is missing or not loaded
+
+<<< encrypted_invalid_passphrase
+Local: NewSession: loadEnvFromPaths: LoadPrivateKeyInteractive: x509: decryption password incorrect