diff options
| author | Shulhan <ms@kilabit.info> | 2023-12-21 16:38:29 +0700 |
|---|---|---|
| committer | Shulhan <ms@kilabit.info> | 2023-12-21 16:38:29 +0700 |
| commit | 3e1bdaf0cdb3f9087fe36e15da704ace8f38466c (patch) | |
| tree | f07adb9f2ebe15d3e8a44ed950d4ab467e7790a7 | |
| parent | 0f1a82f3abecfeb6142c671d3d5c9f1cdbe5871f (diff) | |
| download | awwan-3e1bdaf0cdb3f9087fe36e15da704ace8f38466c.tar.xz | |
all: changes default date-time prefix on test
Using "-" as dummy date-time prefix make the test output quite hard
to read, especially since we use the same prefix "===" and "---" with Go
test output.
| -rw-r--r-- | awwan_test.go | 2 | ||||
| -rw-r--r-- | testdata/http_server/execute/local_test.data | 6 | ||||
| -rw-r--r-- | testdata/local/local_encrypted.data | 16 | ||||
| -rw-r--r-- | testdata/local/local_test.data | 14 | ||||
| -rw-r--r-- | testdata/play/awwanssh.test/play_test.data | 12 |
5 files changed, 25 insertions, 25 deletions
diff --git a/awwan_test.go b/awwan_test.go index 008702c..2256c5d 100644 --- a/awwan_test.go +++ b/awwan_test.go @@ -12,7 +12,7 @@ import ( ) func TestMain(m *testing.M) { - defLogTimeFormat = `-` + defLogTimeFormat = `----/--/-- --:--:--` timeNow = func() time.Time { return time.Date(2023, time.November, 26, 15, 21, 00, 00, time.UTC) diff --git a/testdata/http_server/execute/local_test.data b/testdata/http_server/execute/local_test.data index ef2b478..d58e0cb 100644 --- a/testdata/http_server/execute/local_test.data +++ b/testdata/http_server/execute/local_test.data @@ -28,11 +28,11 @@ event: begin data: "2023-11-26T15:21:00Z" event: message -data: "- === BEGIN: local /local.aww 1-\n" +data: "----/--/-- --:--:-- === BEGIN: local /local.aww 1-\n" id: 0 event: message -data: "- --> 1: echo \"test\"\n" +data: "----/--/-- --:--:-- --> 1: echo \"test\"\n" id: 1 event: message @@ -40,7 +40,7 @@ data: "test\n" id: 2 event: message -data: "- === END: local /local.aww 1-\n" +data: "----/--/-- --:--:-- === END: local /local.aww 1-\n" id: 3 event: end diff --git a/testdata/local/local_encrypted.data b/testdata/local/local_encrypted.data index 6e5a2df..3d523a0 100644 --- a/testdata/local/local_encrypted.data +++ b/testdata/local/local_encrypted.data @@ -1,23 +1,23 @@ <<< echo_encrypted -- === BEGIN: local testdata/local/local_encrypted.aww 3 -- --> 3: echo this_is_a_secret +----/--/-- --:--:-- === BEGIN: local testdata/local/local_encrypted.aww 3 +----/--/-- --:--:-- --> 3: echo this_is_a_secret this_is_a_secret -- === END: local testdata/local/local_encrypted.aww 3 +----/--/-- --:--:-- === END: local testdata/local/local_encrypted.aww 3 <<< echo_encrypted_no_pass Local: NewScript: ParseScript: template: local_encrypted.aww:3:7: executing "local_encrypted.aww" at <.Val>: error calling Val: "secret::pass" is empty <<< echo_encrypted_no_pass:output -- !!! NewScript: ParseScript: template: local_encrypted.aww:3:7: executing "local_encrypted.aww" at <.Val>: error calling Val: "secret::pass" is empty +----/--/-- --:--:-- !!! NewScript: ParseScript: template: local_encrypted.aww:3:7: executing "local_encrypted.aww" at <.Val>: error calling Val: "secret::pass" is empty <<< echo_encrypted_invalid_pass Local: NewSession: .awwan.env.vault: LoadPrivateKeyInteractive: x509: decryption password incorrect <<< echo_encrypted_invalid_pass:output -- !!! NewSession: .awwan.env.vault: LoadPrivateKeyInteractive: x509: decryption password incorrect +----/--/-- --:--:-- !!! NewSession: .awwan.env.vault: LoadPrivateKeyInteractive: x509: decryption password incorrect <<< sub_echo_encrypted -- === BEGIN: local testdata/local/sub/local_encrypted.aww 1 -- --> 1: echo this_is_a_secret_in_sub +----/--/-- --:--:-- === BEGIN: local testdata/local/sub/local_encrypted.aww 1 +----/--/-- --:--:-- --> 1: echo this_is_a_secret_in_sub this_is_a_secret_in_sub -- === END: local testdata/local/sub/local_encrypted.aww 1 +----/--/-- --:--:-- === END: local testdata/local/sub/local_encrypted.aww 1 diff --git a/testdata/local/local_test.data b/testdata/local/local_test.data index 331293f..5086704 100644 --- a/testdata/local/local_test.data +++ b/testdata/local/local_test.data @@ -1,15 +1,15 @@ Test on "local" command. <<< local:1- -- === BEGIN: local testdata/local/local.aww 1- -- --> 1: echo "hello" +----/--/-- --:--:-- === BEGIN: local testdata/local/local.aww 1- +----/--/-- --:--:-- --> 1: echo "hello" hello -- --> 3: #local: echo "nothing" +----/--/-- --:--:-- --> 3: #local: echo "nothing" nothing -- --> 5: echo "local" +----/--/-- --:--:-- --> 5: echo "local" local -- === END: local testdata/local/local.aww 1- +----/--/-- --:--:-- === END: local testdata/local/local.aww 1- <<< local:100- -- === BEGIN: local testdata/local/local.aww 100- -- === END: local testdata/local/local.aww 100- +----/--/-- --:--:-- === BEGIN: local testdata/local/local.aww 100- +----/--/-- --:--:-- === END: local testdata/local/local.aww 100- diff --git a/testdata/play/awwanssh.test/play_test.data b/testdata/play/awwanssh.test/play_test.data index e6e1323..46445e8 100644 --- a/testdata/play/awwanssh.test/play_test.data +++ b/testdata/play/awwanssh.test/play_test.data @@ -1,11 +1,11 @@ Test on "play" command. <<< play_with_local:output -- --- SSH connection: awwanssh@127.0.0.1:10022 -- --- SSH identity file: [/home/awwan/.ssh/id_ed25519] -- === BEGIN: play testdata/play/awwanssh.test/play.aww 1- -- --> 2: pwd +----/--/-- --:--:-- --- SSH connection: awwanssh@127.0.0.1:10022 +----/--/-- --:--:-- --- SSH identity file: [/home/awwan/.ssh/id_ed25519] +----/--/-- --:--:-- === BEGIN: play testdata/play/awwanssh.test/play.aww 1- +----/--/-- --:--:-- --> 2: pwd /home/awwanssh -- --> 5: #local: pwd +----/--/-- --:--:-- --> 5: #local: pwd /home/awwan/src -- === END: play testdata/play/awwanssh.test/play.aww 1- +----/--/-- --:--:-- === END: play testdata/play/awwanssh.test/play.aww 1- |
