From 5852fee4ad3a528b2770b3942e2c98d9b08485a5 Mon Sep 17 00:00:00 2001 From: GollyTicker Date: Thu, 5 Oct 2023 11:05:12 +0200 Subject: [PATCH] Final update of tests and docs --- EXAMPLES.md | 16 +- README.md | 2 +- TESTS.md | 169 ++++++++++++++++-- doc/generated.usage.txt | 2 +- src/flags.go | 2 +- src/protocurl.go | 3 +- .../additional-curl-args--X_GET-expected.txt | 4 +- .../results/additional-curl-args-expected.txt | 4 +- ...onal-curl-args-verbose--X_GET-expected.txt | 6 +- .../additional-curl-args-verbose-expected.txt | 6 +- ...lay-binary-and-headers--X_GET-expected.txt | 4 +- .../display-binary-and-headers-expected.txt | 4 +- ...ay-binary-and-headers-no-curl-expected.txt | 4 +- test/results/echo-empty--X_GET-expected.txt | 2 +- .../results/echo-empty--X_GET_-v-expected.txt | 4 +- test/results/echo-empty--X_HEAD-expected.txt | 2 +- .../echo-empty--X_HEAD_--no-curl-expected.txt | 2 +- .../echo-empty--X_HEAD_-v-expected.txt | 4 +- test/results/echo-empty-expected.txt | 2 +- test/results/echo-empty-no-curl-expected.txt | 2 +- ...o-empty-with-curl-args--X_GET-expected.txt | 4 +- .../echo-empty-with-curl-args-expected.txt | 4 +- test/results/echo-filled--X_GET-expected.txt | 2 +- test/results/echo-filled-expected.txt | 2 +- test/results/echo-filled-no-curl-expected.txt | 2 +- test/results/echo-full--X_GET-expected.txt | 2 +- test/results/echo-full-expected.txt | 2 +- .../echo-full-json--X_GET-expected.txt | 2 +- test/results/echo-full-json-expected.txt | 2 +- test/results/echo-full-no-curl-expected.txt | 2 +- ...ay-epoch-time-thursday--X_GET-expected.txt | 2 +- ...empty-day-epoch-time-thursday-expected.txt | 2 +- ...-thursday-missing-curl--X_GET-expected.txt | 2 +- ...ch-time-thursday-missing-curl-expected.txt | 2 +- ...thursday-missing-curl-no-curl-expected.txt | 2 +- ...y-epoch-time-thursday-no-curl-expected.txt | 2 +- .../failure-simple--X_GET-expected.txt | 2 +- test/results/failure-simple-expected.txt | 2 +- .../failure-simple-no-curl-expected.txt | 2 +- test/results/far-future--X_GET-expected.txt | 2 +- test/results/far-future-expected.txt | 2 +- .../far-future-json--X_GET-expected.txt | 2 +- test/results/far-future-json--v-expected.txt | 4 +- test/results/far-future-json-expected.txt | 2 +- test/results/far-future-no-curl-expected.txt | 2 +- .../global-protoc-and-lib--X_GET-expected.txt | 2 +- .../global-protoc-and-lib-expected.txt | 2 +- test/results/help--X_GET-expected.txt | 2 +- test/results/help-expected.txt | 2 +- .../help-missing-curl--X_GET-expected.txt | 2 +- test/results/help-missing-curl-expected.txt | 2 +- .../help-missing-curl-no-curl-expected.txt | 2 +- test/results/help-no-curl-expected.txt | 2 +- ...d-message-package-path--X_GET-expected.txt | 4 +- ...inferred-message-package-path-expected.txt | 4 +- ...me-clash-explicit-path--X_GET-expected.txt | 4 +- ...path-name-clash-explicit-path-expected.txt | 4 +- ...ge-package-path-nested--X_GET-expected.txt | 2 +- ...d-message-package-path-nested-expected.txt | 2 +- ...age-path-nested-subdir--X_GET-expected.txt | 2 +- ...ge-package-path-nested-subdir-expected.txt | 2 +- .../inferred-proto-file--F-expected.txt | 2 +- ...inferred-proto-file--F_-X_GET-expected.txt | 2 +- .../inferred-proto-file--X_GET-expected.txt | 2 +- test/results/inferred-proto-file-expected.txt | 2 +- ...e-message-package-path--X_GET-expected.txt | 2 +- ...oto-file-message-package-path-expected.txt | 2 +- test/results/json-in--X_GET-expected.txt | 2 +- test/results/json-in-expected.txt | 2 +- ...-in-proper-proto-names--X_GET-expected.txt | 2 +- .../json-in-proper-proto-names-expected.txt | 2 +- .../json-in-text-output--X_GET-expected.txt | 4 +- test/results/json-in-text-output-expected.txt | 4 +- .../json-out-pretty--X_GET-expected.txt | 2 +- test/results/json-out-pretty-expected.txt | 2 +- ...age-path-nested-subdir--X_GET-expected.txt | 2 +- ...ge-package-path-nested-subdir-expected.txt | 2 +- test/results/missing-args--X_GET-expected.txt | 2 +- test/results/missing-args-expected.txt | 2 +- .../results/missing-args-no-curl-expected.txt | 2 +- .../missing-args-partial--X_GET-expected.txt | 2 +- .../results/missing-args-partial-expected.txt | 2 +- .../missing-args-partial-no-curl-expected.txt | 2 +- ...ader-args-not-possible--X_GET-expected.txt | 2 +- ...curl-header-args-not-possible-expected.txt | 2 +- .../missing-curl-no-curl--X_GET-expected.txt | 2 +- .../results/missing-curl-no-curl-expected.txt | 2 +- test/results/moved-curl--X_GET-expected.txt | 2 +- test/results/moved-curl-expected.txt | 2 +- ...om-content-type-header--X_GET-expected.txt | 4 +- ...th-custom-content-type-header-expected.txt | 4 +- ...-no-additional-headers--X_GET-expected.txt | 4 +- ...rs-with-no-additional-headers-expected.txt | 4 +- ...ders-with-no-curl-flag--X_GET-expected.txt | 2 +- ...ult-headers-with-no-curl-flag-expected.txt | 2 +- test/results/no-reason--X_GET-expected.txt | 2 +- test/results/no-reason-curl-expected.txt | 2 +- test/results/no-reason-expected.txt | 2 +- ...er-days-are-happy-days--X_GET-expected.txt | 2 +- .../other-days-are-happy-days-expected.txt | 2 +- ...-days-moved-protofiles--X_GET-expected.txt | 2 +- ...e-happy-days-moved-protofiles-expected.txt | 2 +- ...days-moved-protofiles-no-curl-expected.txt | 2 +- ...r-days-are-happy-days-no-curl-expected.txt | 2 +- ...rg-inferred-decode-raw--X_GET-expected.txt | 4 +- ...-type-arg-inferred-decode-raw-expected.txt | 4 +- ...g-overidden-decode-raw--X_GET-expected.txt | 4 +- ...type-arg-overidden-decode-raw-expected.txt | 4 +- test/results/text-in--X_GET-expected.txt | 2 +- test/results/text-in-expected.txt | 2 +- .../text-in-json-output--X_GET-expected.txt | 4 +- test/results/text-in-json-output-expected.txt | 4 +- ...e-permissions-readable--X_GET-expected.txt | 2 +- ...tmp-file-permissions-readable-expected.txt | 2 +- ...nknown-message-as-text--X_GET-expected.txt | 2 +- .../unknown-message-as-text-expected.txt | 2 +- ...verbose-custom-headers--X_GET-expected.txt | 4 +- .../verbose-custom-headers-expected.txt | 4 +- test/results/verbose-expected.txt | 4 +- ...-long-args-equals-args--X_GET-expected.txt | 4 +- ...verbose-long-args-equals-args-expected.txt | 4 +- .../verbose-missing-curl--X_GET-expected.txt | 2 +- .../results/verbose-missing-curl-expected.txt | 4 +- test/results/verbose-no-curl-expected.txt | 4 +- ...day-is-not-a-happy-day--X_GET-expected.txt | 2 +- ...ay-is-not-a-happy-day--X_POST-expected.txt | 2 +- .../wednesday-is-not-a-happy-day-expected.txt | 2 +- ...s-not-a-happy-day-json--X_GET-expected.txt | 2 +- ...esday-is-not-a-happy-day-json-expected.txt | 2 +- ...-not-a-happy-day-json-no-curl-expected.txt | 2 +- ...ay-is-not-a-happy-day-no-curl-expected.txt | 2 +- ...ithout-input--X_GET_--no-curl-expected.txt | 6 + ...t--X_GET_-i___HappyDayRequest-expected.txt | 2 +- ...ut-input--i___HappyDayRequest-expected.txt | 2 +- test/servers/server.ts | 7 - test/suite/testcases.json | 1 + 136 files changed, 342 insertions(+), 194 deletions(-) create mode 100644 test/results/without-input--X_GET_--no-curl-expected.txt diff --git a/EXAMPLES.md b/EXAMPLES.md index 868bccc..975baae 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -26,7 +26,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -u http://localhost:8080/happy-day/verify \ -d "includeReason: true" -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true @@ -41,7 +41,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -f happyday.proto -i happyday.HappyDayRequest -o happyday.HappyDayResponse \ -u http://localhost:8080/happy-day/verify -d "" -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> =========================== POST Response Text =========================== <<< isHappyDay: true @@ -56,7 +56,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -u http://localhost:8080/happy-day/verify \ -d "date: { seconds: 1648044939}" -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 } @@ -96,7 +96,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -u http://localhost:8080/happy-day/verify \ -d "{ \"date\": \"2022-03-23T14:15:39Z\" }" -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z"} =========================== POST Response JSON =========================== <<< {"formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} @@ -110,7 +110,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -u http://localhost:8080/happy-day/verify --out=json:pretty \ -d "{ \"date\": \"2022-03-23T14:15:39Z\" }" -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z"} =========================== POST Response JSON =========================== <<< { @@ -157,7 +157,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -d "date: { seconds: 1648044939}" \ --curl -n -H 'Content-Type: application/octet-stream' -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 } @@ -410,7 +410,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 } @@ -435,7 +435,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:46:17 GMT +Date: Thu, 05 Oct 2023 09:21:38 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 35 diff --git a/README.md b/README.md index 2f819b7..c875018 100644 --- a/README.md +++ b/README.md @@ -103,7 +103,7 @@ Then protocurl will and produce the following output: ``` -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/TESTS.md b/TESTS.md index 36f6b59..f8c3eeb 100644 --- a/TESTS.md +++ b/TESTS.md @@ -47,8 +47,6 @@ of the form testSingleSpec '' '' '' 'some-arg-for-one-scenario' 'some-arg-for-another-scenario' ``` -todo. update this documentation - During the execution of each line in this script, the output will be written into `test/results/$FILENAME-out.txt` - which will be compared via `diff` to `test/results/$FILENAME-expected.txt`. If both match, then the result is accepted. @@ -60,9 +58,11 @@ If `beforeTestBash` is given, then the bash statements will be executed inside t invoking protocurl with the given arguments. This enables one to explicitly remove curl from the container for testing purposes. The same happens with `afterTestBash`, except they are run after protocurl was invoked. -If `runAgainWithArg` is given, then the test case will be run twice. It will be run once with the given normal arguments -and once more with the given `<--some-arg>` prepended to the arguments of protocurl. This is useful to run the testcases -twice with `--no-curl` to check, that the output is (mostly) the same regardless of the http implementation used. +If `rerunwithArgForEachElement` is given, then the test case will be run an additional time for each element in the array. +Each additional run will prepend one of the elements in this array to the arguments and invoke protocurl. +This is very useful to test multiple similar scenarios where the behavior should be same/different. +In the above example, in addition to invoking protocurl with `args`, we will invoke it with `some-arg-for-one-scenario args` and `some-arg-for-another-scenario args` as well. During execution of these tests, each testcase is named after the base filename with these additional args appended. + **Examples for the inputs, outputs and arguments can hence be found in the test/results directory as well as test/suite/testcases.json.** @@ -112,83 +112,232 @@ Running the tests might look like this: ``` $ ./test/suite/test.sh "$PWD" -Established Protobuf version 3.20.0 -Established Go version: 1.18 -Established Goreleaser version: v1.7.0 -Using VERSION=0.0.43, VVERSION=v0.0.43, SNAPSHOT=false, BUILD_ARCH=amd64, PROTO_VERSION=3.20.0 +Populating cache... +Established Protobuf version 24.4 +Using cache... +Established go version 1.21.1 +Using cache... +Established Goreleaser version v1.21.2 +Using cache... +Established Latest released protoCURL version v1.7.0 +Variables: VERSION=1.8.0-rc-dev, VVERSION=v1.8.0-rc-dev, SNAPSHOT=true, BUILD_ARCH=amd64, PROTO_VERSION=24.4 Stopping server... Done. Building protocurl:latest ... -sha256:31e53eda86190d57f39be5075a50cfd82ee2aee73094945ba63c9d63e1381879 +sha256:cc3be835f4e8a05cc0083bdfccc2c5c09854f4dc585bdedcb780d0bf582c5c9c +Done. +Building test image variant of protocurl including additonal executables ... +[+] Building 0.3s (15/15) FINISHED docker:default + => [internal] load build definition from Dockerfile 0.0s + => => transferring dockerfile: 608B 0.0s + => [internal] load .dockerignore 0.0s + => => transferring context: 78B 0.0s + => [internal] load metadata for docker.io/library/debian:11-slim 0.2s + => [internal] load metadata for docker.io/library/protocurl:latest 0.0s + => [builder 1/2] FROM docker.io/library/debian:11-slim@sha256:c618be84fc82aa8ba203abbb07218410b0f5b3c7cb6b4e7248fda7785d4f9946 0.0s + => [final 1/8] FROM docker.io/library/protocurl:latest 0.0s + => CACHED [builder 2/2] RUN apt-get update && apt-get install -y inotify-tools procps 0.0s + => CACHED [final 2/8] COPY --from=builder /bin/* /bin/ 0.0s + => CACHED [final 3/8] COPY --from=builder /usr/bin/* /usr/bin/ 0.0s + => CACHED [final 4/8] COPY --from=builder /lib/*-linux-gnu /lib/x86_64-linux-gnu/ 0.0s + => CACHED [final 5/8] COPY --from=builder /lib/*-linux-gnu /lib/aarch_64-linux-gnu/ 0.0s + => CACHED [final 6/8] COPY --from=builder /usr/lib/*-linux-gnu /usr/lib/x86_64-linux-gnu/ 0.0s + => CACHED [final 7/8] COPY --from=builder /usr/lib/*-linux-gnu /usr/lib/aarch_64-linux-gnu/ 0.0s + => CACHED [final 8/8] COPY --from=builder /lib64*/ld-linux-*.so.2 /lib64/ 0.0s + => exporting to image 0.0s + => => exporting layers 0.0s + => => writing image sha256:1c56da99fb8a4e5cc3303bb9b4170254e6e962758c96fcf7718a6dfc08a3c999 0.0s + => => naming to docker.io/library/protocurl:latest-test 0.0s Done. Starting server... Done. Waiting for server to become ready... Waited 2 seconds already... +Waited 3 seconds already... === Test server is ready === === Running ALL Tests === ✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day ✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day-no-curl +✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day--X_GET +✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day--X_POST +✨✨✨ SUCCESS ✨✨✨ - unknown-message-package-path-error +✨✨✨ SUCCESS ✨✨✨ - unknown-message-package-path-error--X_GET +✨✨✨ SUCCESS ✨✨✨ - unknown-base-message-name-error +✨✨✨ SUCCESS ✨✨✨ - unknown-base-message-name-error--X_GET +✨✨✨ SUCCESS ✨✨✨ - message-package-path-resolved-to-non-message-error +✨✨✨ SUCCESS ✨✨✨ - message-package-path-resolved-to-non-message-error--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-nested +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-nested--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file--F +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file--F_-X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file-message-package-path +✨✨✨ SUCCESS ✨✨✨ - inferred-proto-file-message-package-path--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-name-clash-ambiguous-error +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-name-clash-ambiguous-error--X_GET +✨✨✨ SUCCESS ✨✨✨ - message-package-path-nested-subdir +✨✨✨ SUCCESS ✨✨✨ - message-package-path-nested-subdir--X_GET +✨✨✨ SUCCESS ✨✨✨ - without-input +✨✨✨ SUCCESS ✨✨✨ - without-input--X_GET +✨✨✨ SUCCESS ✨✨✨ - without-input--X_GET_--no-curl +✨✨✨ SUCCESS ✨✨✨ - without-input--i___HappyDayRequest +✨✨✨ SUCCESS ✨✨✨ - without-input--X_GET_-i___HappyDayRequest +✨✨✨ SUCCESS ✨✨✨ - without-request-type +✨✨✨ SUCCESS ✨✨✨ - without-request-type--X_GET +✨✨✨ SUCCESS ✨✨✨ - unknown-message-as-text +✨✨✨ SUCCESS ✨✨✨ - unknown-message-as-text--X_GET +✨✨✨ SUCCESS ✨✨✨ - unknown-message-as-json +✨✨✨ SUCCESS ✨✨✨ - unknown-message-as-json--X_GET +✨✨✨ SUCCESS ✨✨✨ - response-type-arg-inferred-decode-raw +✨✨✨ SUCCESS ✨✨✨ - response-type-arg-inferred-decode-raw--X_GET +✨✨✨ SUCCESS ✨✨✨ - response-type-arg-overidden-decode-raw +✨✨✨ SUCCESS ✨✨✨ - response-type-arg-overidden-decode-raw--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-nested-subdir +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-nested-subdir--X_GET +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-name-clash-explicit-path +✨✨✨ SUCCESS ✨✨✨ - inferred-message-package-path-name-clash-explicit-path--X_GET +✨✨✨ SUCCESS ✨✨✨ - infer-files-provide-file-wrong-args +✨✨✨ SUCCESS ✨✨✨ - infer-files-provide-file-wrong-args--X_GET +✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day-json +✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day-json-no-curl +✨✨✨ SUCCESS ✨✨✨ - wednesday-is-not-a-happy-day-json--X_GET +✨✨✨ SUCCESS ✨✨✨ - in-wrong +✨✨✨ SUCCESS ✨✨✨ - in-wrong--X_GET +✨✨✨ SUCCESS ✨✨✨ - out-wrong +✨✨✨ SUCCESS ✨✨✨ - out-wrong--X_GET +✨✨✨ SUCCESS ✨✨✨ - json-in +✨✨✨ SUCCESS ✨✨✨ - json-in--X_GET +✨✨✨ SUCCESS ✨✨✨ - json-in-proper-proto-names +✨✨✨ SUCCESS ✨✨✨ - json-in-proper-proto-names--X_GET +✨✨✨ SUCCESS ✨✨✨ - json-out-pretty +✨✨✨ SUCCESS ✨✨✨ - json-out-pretty--X_GET +✨✨✨ SUCCESS ✨✨✨ - json-in-wrong-arg +✨✨✨ SUCCESS ✨✨✨ - json-in-wrong-arg--X_GET +✨✨✨ SUCCESS ✨✨✨ - text-in +✨✨✨ SUCCESS ✨✨✨ - text-in--X_GET +✨✨✨ SUCCESS ✨✨✨ - text-in-wrong-arg +✨✨✨ SUCCESS ✨✨✨ - text-in-wrong-arg--X_GET +✨✨✨ SUCCESS ✨✨✨ - text-in-json-output +✨✨✨ SUCCESS ✨✨✨ - text-in-json-output--X_GET +✨✨✨ SUCCESS ✨✨✨ - json-in-text-output +✨✨✨ SUCCESS ✨✨✨ - json-in-text-output--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-curl-no-curl +✨✨✨ SUCCESS ✨✨✨ - missing-curl-no-curl--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-curl-header-args-not-possible +✨✨✨ SUCCESS ✨✨✨ - missing-curl-header-args-not-possible--X_GET ✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days ✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days-no-curl +✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days--X_GET ✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days-moved-protofiles ✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days-moved-protofiles-no-curl +✨✨✨ SUCCESS ✨✨✨ - other-days-are-happy-days-moved-protofiles--X_GET ✨✨✨ SUCCESS ✨✨✨ - invalid-protofile-path +✨✨✨ SUCCESS ✨✨✨ - invalid-protofile-path--X_GET ✨✨✨ SUCCESS ✨✨✨ - invalid-protofile-dir +✨✨✨ SUCCESS ✨✨✨ - invalid-protofile-dir--X_GET ✨✨✨ SUCCESS ✨✨✨ - verbose ✨✨✨ SUCCESS ✨✨✨ - verbose-no-curl +✨✨✨ SUCCESS ✨✨✨ - verbose-long-args-equals-args +✨✨✨ SUCCESS ✨✨✨ - verbose-long-args-equals-args--X_GET ✨✨✨ SUCCESS ✨✨✨ - verbose-custom-headers ✨✨✨ SUCCESS ✨✨✨ - verbose-custom-headers-no-curl +✨✨✨ SUCCESS ✨✨✨ - verbose-custom-headers--X_GET ✨✨✨ SUCCESS ✨✨✨ - verbose-missing-curl +✨✨✨ SUCCESS ✨✨✨ - verbose-missing-curl--X_GET ✨✨✨ SUCCESS ✨✨✨ - quiet-with-content ✨✨✨ SUCCESS ✨✨✨ - quiet-with-content-no-curl +✨✨✨ SUCCESS ✨✨✨ - quiet-with-content--X_GET ✨✨✨ SUCCESS ✨✨✨ - display-binary-and-headers ✨✨✨ SUCCESS ✨✨✨ - display-binary-and-headers-no-curl +✨✨✨ SUCCESS ✨✨✨ - display-binary-and-headers--X_GET ✨✨✨ SUCCESS ✨✨✨ - additional-curl-args ✨✨✨ SUCCESS ✨✨✨ - additional-curl-args-no-curl +✨✨✨ SUCCESS ✨✨✨ - additional-curl-args--X_GET ✨✨✨ SUCCESS ✨✨✨ - additional-curl-args-verbose +✨✨✨ SUCCESS ✨✨✨ - additional-curl-args-verbose--X_GET ✨✨✨ SUCCESS ✨✨✨ - no-reason ✨✨✨ SUCCESS ✨✨✨ - no-reason-curl +✨✨✨ SUCCESS ✨✨✨ - no-reason--X_GET ✨✨✨ SUCCESS ✨✨✨ - far-future ✨✨✨ SUCCESS ✨✨✨ - far-future-no-curl +✨✨✨ SUCCESS ✨✨✨ - far-future--X_GET +✨✨✨ SUCCESS ✨✨✨ - far-future-json +✨✨✨ SUCCESS ✨✨✨ - far-future-json--v +✨✨✨ SUCCESS ✨✨✨ - far-future-json--X_GET ✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday ✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday-no-curl +✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday--X_GET ✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday-missing-curl ✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday-missing-curl-no-curl +✨✨✨ SUCCESS ✨✨✨ - empty-day-epoch-time-thursday-missing-curl--X_GET ✨✨✨ SUCCESS ✨✨✨ - moved-curl ✨✨✨ SUCCESS ✨✨✨ - moved-curl-no-curl +✨✨✨ SUCCESS ✨✨✨ - moved-curl--X_GET ✨✨✨ SUCCESS ✨✨✨ - global-protoc +✨✨✨ SUCCESS ✨✨✨ - global-protoc--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-protocurl-internal +✨✨✨ SUCCESS ✨✨✨ - missing-protocurl-internal--X_GET ✨✨✨ SUCCESS ✨✨✨ - global-protoc-and-lib +✨✨✨ SUCCESS ✨✨✨ - global-protoc-and-lib--X_GET ✨✨✨ SUCCESS ✨✨✨ - moved-lib +✨✨✨ SUCCESS ✨✨✨ - moved-lib--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-protoc +✨✨✨ SUCCESS ✨✨✨ - missing-protoc--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-protoc-global +✨✨✨ SUCCESS ✨✨✨ - missing-protoc-global--X_GET ✨✨✨ SUCCESS ✨✨✨ - echo-filled ✨✨✨ SUCCESS ✨✨✨ - echo-filled-no-curl +✨✨✨ SUCCESS ✨✨✨ - echo-filled--X_GET ✨✨✨ SUCCESS ✨✨✨ - echo-empty ✨✨✨ SUCCESS ✨✨✨ - echo-empty-no-curl +✨✨✨ SUCCESS ✨✨✨ - echo-empty--X_GET +✨✨✨ SUCCESS ✨✨✨ - echo-empty--X_GET_-v +✨✨✨ SUCCESS ✨✨✨ - echo-empty--X_HEAD +✨✨✨ SUCCESS ✨✨✨ - echo-empty--X_HEAD_-v +✨✨✨ SUCCESS ✨✨✨ - echo-empty--X_HEAD_--no-curl ✨✨✨ SUCCESS ✨✨✨ - echo-empty-with-curl-args ✨✨✨ SUCCESS ✨✨✨ - echo-empty-with-curl-args-no-curl +✨✨✨ SUCCESS ✨✨✨ - echo-empty-with-curl-args--X_GET ✨✨✨ SUCCESS ✨✨✨ - echo-full ✨✨✨ SUCCESS ✨✨✨ - echo-full-no-curl +✨✨✨ SUCCESS ✨✨✨ - echo-full--X_GET +✨✨✨ SUCCESS ✨✨✨ - echo-full-json +✨✨✨ SUCCESS ✨✨✨ - echo-full-json--X_GET ✨✨✨ SUCCESS ✨✨✨ - echo-quiet ✨✨✨ SUCCESS ✨✨✨ - echo-quiet-no-curl +✨✨✨ SUCCESS ✨✨✨ - echo-quiet--X_GET ✨✨✨ SUCCESS ✨✨✨ - failure-simple ✨✨✨ SUCCESS ✨✨✨ - failure-simple-no-curl +✨✨✨ SUCCESS ✨✨✨ - failure-simple--X_GET ✨✨✨ SUCCESS ✨✨✨ - failure-simple-quiet ✨✨✨ SUCCESS ✨✨✨ - failure-simple-quiet-no-curl +✨✨✨ SUCCESS ✨✨✨ - failure-simple-quiet--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-args ✨✨✨ SUCCESS ✨✨✨ - missing-args-no-curl +✨✨✨ SUCCESS ✨✨✨ - missing-args--X_GET ✨✨✨ SUCCESS ✨✨✨ - missing-args-partial ✨✨✨ SUCCESS ✨✨✨ - missing-args-partial-no-curl +✨✨✨ SUCCESS ✨✨✨ - missing-args-partial--X_GET ✨✨✨ SUCCESS ✨✨✨ - help ✨✨✨ SUCCESS ✨✨✨ - help-no-curl +✨✨✨ SUCCESS ✨✨✨ - help--X_GET ✨✨✨ SUCCESS ✨✨✨ - help-missing-curl ✨✨✨ SUCCESS ✨✨✨ - help-missing-curl-no-curl +✨✨✨ SUCCESS ✨✨✨ - help-missing-curl--X_GET ✨✨✨ SUCCESS ✨✨✨ - version ✨✨✨ SUCCESS ✨✨✨ - version-no-curl +✨✨✨ SUCCESS ✨✨✨ - version--X_GET +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-no-additional-headers +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-no-additional-headers--X_GET +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-custom-content-type-header +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-custom-content-type-header--X_GET +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-no-curl-flag +✨✨✨ SUCCESS ✨✨✨ - no-default-headers-with-no-curl-flag--X_GET +✨✨✨ SUCCESS ✨✨✨ - tmp-file-permissions-readable +✨✨✨ SUCCESS ✨✨✨ - tmp-file-permissions-readable--X_GET === Finished Running ALL Tests === Stopping server... Done. diff --git a/doc/generated.usage.txt b/doc/generated.usage.txt index 080e1e9..0018472 100644 --- a/doc/generated.usage.txt +++ b/doc/generated.usage.txt @@ -28,7 +28,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/src/flags.go b/src/flags.go index efe8f1c..88c2079 100644 --- a/src/flags.go +++ b/src/flags.go @@ -61,7 +61,7 @@ func intialiseFlags() { "Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred.") flags.StringVarP(&CurrentConfig.Method, "method", "X", "POST", - "HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically.") + "HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically.") flags.StringVarP(&CurrentConfig.RequestType, "request-type", "i", "", "Message name or full package path of the Protobuf request type. The path can be shortened to '..', if the name of the request message is unique. Mandatory for POST requests. E.g. mypackage.MyRequest or ..MyRequest") diff --git a/src/protocurl.go b/src/protocurl.go index 55e8fe1..4b64566 100644 --- a/src/protocurl.go +++ b/src/protocurl.go @@ -113,8 +113,7 @@ func encodeToBinary(requestType string, text string, registry *protoregistry.Fil ) if !CurrentConfig.ShowOutputOnly { - // todo. remove one space here for aligned output - fmt.Printf("%s %s Request %s %s %s\n%s\n", + fmt.Printf("%s %s Request %s %s %s\n%s\n", VISUAL_SEPARATOR, CurrentConfig.Method, displayIn(CurrentConfig.InTextType), VISUAL_SEPARATOR, SEND, reconstructedRequestText) } diff --git a/test/results/additional-curl-args--X_GET-expected.txt b/test/results/additional-curl-args--X_GET-expected.txt index 3b09751..28bba62 100644 --- a/test/results/additional-curl-args--X_GET-expected.txt +++ b/test/results/additional-curl-args--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -10,7 +10,7 @@ includeReason: true =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:55:15 GMT +Date: Thu, 05 Oct 2023 09:18:01 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/additional-curl-args-expected.txt b/test/results/additional-curl-args-expected.txt index 406bb4d..0a90f99 100644 --- a/test/results/additional-curl-args-expected.txt +++ b/test/results/additional-curl-args-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -10,7 +10,7 @@ includeReason: true =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:35 GMT +Date: Thu, 05 Oct 2023 09:18:00 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/additional-curl-args-verbose--X_GET-expected.txt b/test/results/additional-curl-args-verbose--X_GET-expected.txt index f2901d2..3af8fa5 100644 --- a/test/results/additional-curl-args-verbose--X_GET-expected.txt +++ b/test/results/additional-curl-args-verbose--X_GET-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -279,7 +279,7 @@ Total curl args: * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Wed, 04 Oct 2023 08:55:21 GMT +< Date: Thu, 05 Oct 2023 09:18:02 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 65 @@ -290,7 +290,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:55:21 GMT +Date: Thu, 05 Oct 2023 09:18:02 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/additional-curl-args-verbose-expected.txt b/test/results/additional-curl-args-verbose-expected.txt index f8f9ccb..b5ed551 100644 --- a/test/results/additional-curl-args-verbose-expected.txt +++ b/test/results/additional-curl-args-verbose-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -279,7 +279,7 @@ Total curl args: * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Tue, 03 Oct 2023 20:42:36 GMT +< Date: Thu, 05 Oct 2023 09:18:01 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 65 @@ -290,7 +290,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:36 GMT +Date: Thu, 05 Oct 2023 09:18:01 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/display-binary-and-headers--X_GET-expected.txt b/test/results/display-binary-and-headers--X_GET-expected.txt index f10eef4..d890aa3 100644 --- a/test/results/display-binary-and-headers--X_GET-expected.txt +++ b/test/results/display-binary-and-headers--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -10,7 +10,7 @@ includeReason: true =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:55:07 GMT +Date: Thu, 05 Oct 2023 09:18:00 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/display-binary-and-headers-expected.txt b/test/results/display-binary-and-headers-expected.txt index 406bb4d..5af5e9f 100644 --- a/test/results/display-binary-and-headers-expected.txt +++ b/test/results/display-binary-and-headers-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -10,7 +10,7 @@ includeReason: true =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:35 GMT +Date: Thu, 05 Oct 2023 09:17:59 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/display-binary-and-headers-no-curl-expected.txt b/test/results/display-binary-and-headers-no-curl-expected.txt index ea8376e..8de7268 100644 --- a/test/results/display-binary-and-headers-no-curl-expected.txt +++ b/test/results/display-binary-and-headers-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -12,7 +12,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:35 GMT +Date: Thu, 05 Oct 2023 09:17:59 GMT Keep-Alive: timeout=5 =========================== POST Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | diff --git a/test/results/echo-empty--X_GET-expected.txt b/test/results/echo-empty--X_GET-expected.txt index 8626f6a..b992840 100644 --- a/test/results/echo-empty--X_GET-expected.txt +++ b/test/results/echo-empty--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> =========================== GET Response Text =========================== <<< diff --git a/test/results/echo-empty--X_GET_-v-expected.txt b/test/results/echo-empty--X_GET_-v-expected.txt index 654dc40..4e77853 100644 --- a/test/results/echo-empty--X_GET_-v-expected.txt +++ b/test/results/echo-empty--X_GET_-v-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> =========================== GET Request Binary =========================== >>> Found curl: /usr/bin/curl @@ -253,7 +253,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 12:50:55 GMT +Date: Thu, 05 Oct 2023 09:18:15 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 0 diff --git a/test/results/echo-empty--X_HEAD-expected.txt b/test/results/echo-empty--X_HEAD-expected.txt index 8b30c4c..5fef615 100644 --- a/test/results/echo-empty--X_HEAD-expected.txt +++ b/test/results/echo-empty--X_HEAD-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== HEAD Request Text =========================== >>> +=========================== HEAD Request Text =========================== >>> =========================== HEAD Response Text =========================== <<< diff --git a/test/results/echo-empty--X_HEAD_--no-curl-expected.txt b/test/results/echo-empty--X_HEAD_--no-curl-expected.txt index e65ab4b..e5739f7 100644 --- a/test/results/echo-empty--X_HEAD_--no-curl-expected.txt +++ b/test/results/echo-empty--X_HEAD_--no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== HEAD Request Text =========================== >>> +=========================== HEAD Request Text =========================== >>> ######### STDERR ######### Error: HTTP method HEAD not supported with internal HTTP implementation. Please use curl. diff --git a/test/results/echo-empty--X_HEAD_-v-expected.txt b/test/results/echo-empty--X_HEAD_-v-expected.txt index 4b36fed..9fbffc6 100644 --- a/test/results/echo-empty--X_HEAD_-v-expected.txt +++ b/test/results/echo-empty--X_HEAD_-v-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== HEAD Request Text =========================== >>> +=========================== HEAD Request Text =========================== >>> =========================== HEAD Request Binary =========================== >>> Found curl: /usr/bin/curl @@ -253,7 +253,7 @@ Total curl args: =========================== HEAD Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 12:50:02 GMT +Date: Thu, 05 Oct 2023 09:18:21 GMT Connection: keep-alive Keep-Alive: timeout=5 =========================== HEAD Response Binary =========================== <<< diff --git a/test/results/echo-empty-expected.txt b/test/results/echo-empty-expected.txt index bf698d7..9fad891 100644 --- a/test/results/echo-empty-expected.txt +++ b/test/results/echo-empty-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> =========================== POST Response Text =========================== <<< diff --git a/test/results/echo-empty-no-curl-expected.txt b/test/results/echo-empty-no-curl-expected.txt index bf698d7..9fad891 100644 --- a/test/results/echo-empty-no-curl-expected.txt +++ b/test/results/echo-empty-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> =========================== POST Response Text =========================== <<< diff --git a/test/results/echo-empty-with-curl-args--X_GET-expected.txt b/test/results/echo-empty-with-curl-args--X_GET-expected.txt index 88794eb..1cf4951 100644 --- a/test/results/echo-empty-with-curl-args--X_GET-expected.txt +++ b/test/results/echo-empty-with-curl-args--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== CURL ERROR =========================== * Trying 127.0.0.1:8080... @@ -16,7 +16,7 @@ includeReason: true * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Wed, 04 Oct 2023 08:57:18 GMT +< Date: Thu, 05 Oct 2023 09:18:28 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 2 diff --git a/test/results/echo-empty-with-curl-args-expected.txt b/test/results/echo-empty-with-curl-args-expected.txt index 21dfa45..7e63297 100644 --- a/test/results/echo-empty-with-curl-args-expected.txt +++ b/test/results/echo-empty-with-curl-args-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== CURL ERROR =========================== * Trying 127.0.0.1:8080... @@ -16,7 +16,7 @@ includeReason: true * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Tue, 03 Oct 2023 20:42:44 GMT +< Date: Thu, 05 Oct 2023 09:18:27 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 2 diff --git a/test/results/echo-filled--X_GET-expected.txt b/test/results/echo-filled--X_GET-expected.txt index 0c6c78a..021dabb 100644 --- a/test/results/echo-filled--X_GET-expected.txt +++ b/test/results/echo-filled--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/echo-filled-expected.txt b/test/results/echo-filled-expected.txt index aa45784..e53fbcc 100644 --- a/test/results/echo-filled-expected.txt +++ b/test/results/echo-filled-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/echo-filled-no-curl-expected.txt b/test/results/echo-filled-no-curl-expected.txt index aa45784..e53fbcc 100644 --- a/test/results/echo-filled-no-curl-expected.txt +++ b/test/results/echo-filled-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/echo-full--X_GET-expected.txt b/test/results/echo-full--X_GET-expected.txt index 45b1bdb..2fe567b 100644 --- a/test/results/echo-full--X_GET-expected.txt +++ b/test/results/echo-full--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/echo-full-expected.txt b/test/results/echo-full-expected.txt index 3bec9af..4788cca 100644 --- a/test/results/echo-full-expected.txt +++ b/test/results/echo-full-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/echo-full-json--X_GET-expected.txt b/test/results/echo-full-json--X_GET-expected.txt index 54cae19..00c13dc 100644 --- a/test/results/echo-full-json--X_GET-expected.txt +++ b/test/results/echo-full-json--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"includeReason":true,"double":0.12346789,"int32":123123123,"int64":"123123123123123","string":"some string here","bytes":"AAEC//79","fooEnum":"BAZ","misc":[{},{"weatherOfPastFewDays":["1","2"],"fooEnum":"FAZ"},{"fooString":"abc"}],"float":0.123} =========================== GET Response JSON =========================== <<< {"includeReason":true,"double":0.12346789,"int32":123123123,"int64":"123123123123123","string":"some string here","bytes":"AAEC//79","fooEnum":"BAZ","misc":[{},{"weatherOfPastFewDays":["1","2"],"fooEnum":"FAZ"},{"fooString":"abc"}],"float":0.123} diff --git a/test/results/echo-full-json-expected.txt b/test/results/echo-full-json-expected.txt index c0efbcc..7918c84 100644 --- a/test/results/echo-full-json-expected.txt +++ b/test/results/echo-full-json-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"includeReason":true,"double":0.12346789,"int32":123123123,"int64":"123123123123123","string":"some string here","bytes":"AAEC//79","fooEnum":"BAZ","misc":[{},{"weatherOfPastFewDays":["1","2"],"fooEnum":"FAZ"},{"fooString":"abc"}],"float":0.123} =========================== POST Response JSON =========================== <<< {"includeReason":true,"double":0.12346789,"int32":123123123,"int64":"123123123123123","string":"some string here","bytes":"AAEC//79","fooEnum":"BAZ","misc":[{},{"weatherOfPastFewDays":["1","2"],"fooEnum":"FAZ"},{"fooString":"abc"}],"float":0.123} diff --git a/test/results/echo-full-no-curl-expected.txt b/test/results/echo-full-no-curl-expected.txt index 3bec9af..4788cca 100644 --- a/test/results/echo-full-no-curl-expected.txt +++ b/test/results/echo-full-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/empty-day-epoch-time-thursday--X_GET-expected.txt b/test/results/empty-day-epoch-time-thursday--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/empty-day-epoch-time-thursday--X_GET-expected.txt +++ b/test/results/empty-day-epoch-time-thursday--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/empty-day-epoch-time-thursday-expected.txt b/test/results/empty-day-epoch-time-thursday-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/empty-day-epoch-time-thursday-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/empty-day-epoch-time-thursday-missing-curl--X_GET-expected.txt b/test/results/empty-day-epoch-time-thursday-missing-curl--X_GET-expected.txt index 385b8c0..02fda97 100644 --- a/test/results/empty-day-epoch-time-thursday-missing-curl--X_GET-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-missing-curl--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true ######### STDERR ######### Error: Internal Http implementation doesn't support GET requests with body. Please use curl. diff --git a/test/results/empty-day-epoch-time-thursday-missing-curl-expected.txt b/test/results/empty-day-epoch-time-thursday-missing-curl-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/empty-day-epoch-time-thursday-missing-curl-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-missing-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/empty-day-epoch-time-thursday-missing-curl-no-curl-expected.txt b/test/results/empty-day-epoch-time-thursday-missing-curl-no-curl-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/empty-day-epoch-time-thursday-missing-curl-no-curl-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-missing-curl-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/empty-day-epoch-time-thursday-no-curl-expected.txt b/test/results/empty-day-epoch-time-thursday-no-curl-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/empty-day-epoch-time-thursday-no-curl-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/failure-simple--X_GET-expected.txt b/test/results/failure-simple--X_GET-expected.txt index 4e595e3..207cb97 100644 --- a/test/results/failure-simple--X_GET-expected.txt +++ b/test/results/failure-simple--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found diff --git a/test/results/failure-simple-expected.txt b/test/results/failure-simple-expected.txt index c258fd0..0565ffd 100644 --- a/test/results/failure-simple-expected.txt +++ b/test/results/failure-simple-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found diff --git a/test/results/failure-simple-no-curl-expected.txt b/test/results/failure-simple-no-curl-expected.txt index c258fd0..0565ffd 100644 --- a/test/results/failure-simple-no-curl-expected.txt +++ b/test/results/failure-simple-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found diff --git a/test/results/far-future--X_GET-expected.txt b/test/results/far-future--X_GET-expected.txt index 91021f1..21e0067 100644 --- a/test/results/far-future--X_GET-expected.txt +++ b/test/results/far-future--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 123231648044939 nanos: 152000000 diff --git a/test/results/far-future-expected.txt b/test/results/far-future-expected.txt index c5ecc90..4b67a01 100644 --- a/test/results/far-future-expected.txt +++ b/test/results/far-future-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 123231648044939 nanos: 152000000 diff --git a/test/results/far-future-json--X_GET-expected.txt b/test/results/far-future-json--X_GET-expected.txt index 04fa2eb..9bb1ee4 100644 --- a/test/results/far-future-json--X_GET-expected.txt +++ b/test/results/far-future-json--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"9999-12-31T23:59:59Z","includeReason":true} =========================== GET Response JSON =========================== <<< {"isHappyDay":true,"reason":"Friday is a Happy Day! ⭐","formattedDate":"Fri, 31 Dec 9999 23:59:59 GMT"} diff --git a/test/results/far-future-json--v-expected.txt b/test/results/far-future-json--v-expected.txt index f094650..3b64bec 100644 --- a/test/results/far-future-json--v-expected.txt +++ b/test/results/far-future-json--v-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"9999-12-31T23:59:59Z","includeReason":true} =========================== POST Request Binary =========================== >>> 00000000 0a 07 08 ff 82 d1 ff af 07 10 01 |...........| @@ -258,7 +258,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:38 GMT +Date: Thu, 05 Oct 2023 09:18:05 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 63 diff --git a/test/results/far-future-json-expected.txt b/test/results/far-future-json-expected.txt index 35b2e8c..4a39dc7 100644 --- a/test/results/far-future-json-expected.txt +++ b/test/results/far-future-json-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"9999-12-31T23:59:59Z","includeReason":true} =========================== POST Response JSON =========================== <<< {"isHappyDay":true,"reason":"Friday is a Happy Day! ⭐","formattedDate":"Fri, 31 Dec 9999 23:59:59 GMT"} diff --git a/test/results/far-future-no-curl-expected.txt b/test/results/far-future-no-curl-expected.txt index c5ecc90..4b67a01 100644 --- a/test/results/far-future-no-curl-expected.txt +++ b/test/results/far-future-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 123231648044939 nanos: 152000000 diff --git a/test/results/global-protoc-and-lib--X_GET-expected.txt b/test/results/global-protoc-and-lib--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/global-protoc-and-lib--X_GET-expected.txt +++ b/test/results/global-protoc-and-lib--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/global-protoc-and-lib-expected.txt b/test/results/global-protoc-and-lib-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/global-protoc-and-lib-expected.txt +++ b/test/results/global-protoc-and-lib-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/help--X_GET-expected.txt b/test/results/help--X_GET-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help--X_GET-expected.txt +++ b/test/results/help--X_GET-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/help-expected.txt b/test/results/help-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help-expected.txt +++ b/test/results/help-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/help-missing-curl--X_GET-expected.txt b/test/results/help-missing-curl--X_GET-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help-missing-curl--X_GET-expected.txt +++ b/test/results/help-missing-curl--X_GET-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/help-missing-curl-expected.txt b/test/results/help-missing-curl-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help-missing-curl-expected.txt +++ b/test/results/help-missing-curl-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/help-missing-curl-no-curl-expected.txt b/test/results/help-missing-curl-no-curl-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help-missing-curl-no-curl-expected.txt +++ b/test/results/help-missing-curl-no-curl-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/help-no-curl-expected.txt b/test/results/help-no-curl-expected.txt index 10a2872..3efbc25 100644 --- a/test/results/help-no-curl-expected.txt +++ b/test/results/help-no-curl-expected.txt @@ -29,7 +29,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/inferred-message-package-path--X_GET-expected.txt b/test/results/inferred-message-package-path--X_GET-expected.txt index f1e59d1..cf344ad 100644 --- a/test/results/inferred-message-package-path--X_GET-expected.txt +++ b/test/results/inferred-message-package-path--X_GET-expected.txt @@ -233,7 +233,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -260,7 +260,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:51:03 GMT +Date: Thu, 05 Oct 2023 09:17:26 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/inferred-message-package-path-expected.txt b/test/results/inferred-message-package-path-expected.txt index 6d5a293..dd006fa 100644 --- a/test/results/inferred-message-package-path-expected.txt +++ b/test/results/inferred-message-package-path-expected.txt @@ -233,7 +233,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -260,7 +260,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:21 GMT +Date: Thu, 05 Oct 2023 09:17:25 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/inferred-message-package-path-name-clash-explicit-path--X_GET-expected.txt b/test/results/inferred-message-package-path-name-clash-explicit-path--X_GET-expected.txt index 2883229..08612dc 100644 --- a/test/results/inferred-message-package-path-name-clash-explicit-path--X_GET-expected.txt +++ b/test/results/inferred-message-package-path-name-clash-explicit-path--X_GET-expected.txt @@ -298,7 +298,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -325,7 +325,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:52:16 GMT +Date: Thu, 05 Oct 2023 09:17:38 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/inferred-message-package-path-name-clash-explicit-path-expected.txt b/test/results/inferred-message-package-path-name-clash-explicit-path-expected.txt index 3e20592..00a557e 100644 --- a/test/results/inferred-message-package-path-name-clash-explicit-path-expected.txt +++ b/test/results/inferred-message-package-path-name-clash-explicit-path-expected.txt @@ -298,7 +298,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -325,7 +325,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:25 GMT +Date: Thu, 05 Oct 2023 09:17:38 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/inferred-message-package-path-nested--X_GET-expected.txt b/test/results/inferred-message-package-path-nested--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/inferred-message-package-path-nested--X_GET-expected.txt +++ b/test/results/inferred-message-package-path-nested--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/inferred-message-package-path-nested-expected.txt b/test/results/inferred-message-package-path-nested-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/inferred-message-package-path-nested-expected.txt +++ b/test/results/inferred-message-package-path-nested-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/inferred-message-package-path-nested-subdir--X_GET-expected.txt b/test/results/inferred-message-package-path-nested-subdir--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/inferred-message-package-path-nested-subdir--X_GET-expected.txt +++ b/test/results/inferred-message-package-path-nested-subdir--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/inferred-message-package-path-nested-subdir-expected.txt b/test/results/inferred-message-package-path-nested-subdir-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/inferred-message-package-path-nested-subdir-expected.txt +++ b/test/results/inferred-message-package-path-nested-subdir-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/inferred-proto-file--F-expected.txt b/test/results/inferred-proto-file--F-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/inferred-proto-file--F-expected.txt +++ b/test/results/inferred-proto-file--F-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/inferred-proto-file--F_-X_GET-expected.txt b/test/results/inferred-proto-file--F_-X_GET-expected.txt index cfd42d9..6d6f091 100644 --- a/test/results/inferred-proto-file--F_-X_GET-expected.txt +++ b/test/results/inferred-proto-file--F_-X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/inferred-proto-file--X_GET-expected.txt b/test/results/inferred-proto-file--X_GET-expected.txt index cfd42d9..6d6f091 100644 --- a/test/results/inferred-proto-file--X_GET-expected.txt +++ b/test/results/inferred-proto-file--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/inferred-proto-file-expected.txt b/test/results/inferred-proto-file-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/inferred-proto-file-expected.txt +++ b/test/results/inferred-proto-file-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/inferred-proto-file-message-package-path--X_GET-expected.txt b/test/results/inferred-proto-file-message-package-path--X_GET-expected.txt index cfd42d9..6d6f091 100644 --- a/test/results/inferred-proto-file-message-package-path--X_GET-expected.txt +++ b/test/results/inferred-proto-file-message-package-path--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/inferred-proto-file-message-package-path-expected.txt b/test/results/inferred-proto-file-message-package-path-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/inferred-proto-file-message-package-path-expected.txt +++ b/test/results/inferred-proto-file-message-package-path-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/json-in--X_GET-expected.txt b/test/results/json-in--X_GET-expected.txt index 8d555cc..3bef0ab 100644 --- a/test/results/json-in--X_GET-expected.txt +++ b/test/results/json-in--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== GET Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/json-in-expected.txt b/test/results/json-in-expected.txt index 255ceab..1b62767 100644 --- a/test/results/json-in-expected.txt +++ b/test/results/json-in-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== POST Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/json-in-proper-proto-names--X_GET-expected.txt b/test/results/json-in-proper-proto-names--X_GET-expected.txt index 64dcde9..138082d 100644 --- a/test/results/json-in-proper-proto-names--X_GET-expected.txt +++ b/test/results/json-in-proper-proto-names--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true,"NonCamel_case_FieldName":"text"} =========================== GET Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/json-in-proper-proto-names-expected.txt b/test/results/json-in-proper-proto-names-expected.txt index b029a41..e9bbef2 100644 --- a/test/results/json-in-proper-proto-names-expected.txt +++ b/test/results/json-in-proper-proto-names-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true,"NonCamel_case_FieldName":"text"} =========================== POST Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/json-in-text-output--X_GET-expected.txt b/test/results/json-in-text-output--X_GET-expected.txt index 6d73dfc..dff635d 100644 --- a/test/results/json-in-text-output--X_GET-expected.txt +++ b/test/results/json-in-text-output--X_GET-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== GET Request Binary =========================== >>> 00000000 0a 06 08 8b d7 ec 91 06 10 01 |..........| @@ -258,7 +258,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:53:31 GMT +Date: Thu, 05 Oct 2023 09:17:48 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/json-in-text-output-expected.txt b/test/results/json-in-text-output-expected.txt index 5441ba8..7eeeb41 100644 --- a/test/results/json-in-text-output-expected.txt +++ b/test/results/json-in-text-output-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== POST Request Binary =========================== >>> 00000000 0a 06 08 8b d7 ec 91 06 10 01 |..........| @@ -258,7 +258,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:29 GMT +Date: Thu, 05 Oct 2023 09:17:48 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/json-out-pretty--X_GET-expected.txt b/test/results/json-out-pretty--X_GET-expected.txt index c4da9ae..393a09b 100644 --- a/test/results/json-out-pretty--X_GET-expected.txt +++ b/test/results/json-out-pretty--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== GET Response JSON =========================== <<< { diff --git a/test/results/json-out-pretty-expected.txt b/test/results/json-out-pretty-expected.txt index 3f6967e..c5bc25d 100644 --- a/test/results/json-out-pretty-expected.txt +++ b/test/results/json-out-pretty-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== POST Response JSON =========================== <<< { diff --git a/test/results/message-package-path-nested-subdir--X_GET-expected.txt b/test/results/message-package-path-nested-subdir--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/message-package-path-nested-subdir--X_GET-expected.txt +++ b/test/results/message-package-path-nested-subdir--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/message-package-path-nested-subdir-expected.txt b/test/results/message-package-path-nested-subdir-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/message-package-path-nested-subdir-expected.txt +++ b/test/results/message-package-path-nested-subdir-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/missing-args--X_GET-expected.txt b/test/results/missing-args--X_GET-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args--X_GET-expected.txt +++ b/test/results/missing-args--X_GET-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-args-expected.txt b/test/results/missing-args-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args-expected.txt +++ b/test/results/missing-args-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-args-no-curl-expected.txt b/test/results/missing-args-no-curl-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args-no-curl-expected.txt +++ b/test/results/missing-args-no-curl-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-args-partial--X_GET-expected.txt b/test/results/missing-args-partial--X_GET-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args-partial--X_GET-expected.txt +++ b/test/results/missing-args-partial--X_GET-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-args-partial-expected.txt b/test/results/missing-args-partial-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args-partial-expected.txt +++ b/test/results/missing-args-partial-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-args-partial-no-curl-expected.txt b/test/results/missing-args-partial-no-curl-expected.txt index a0285b8..7df2f20 100644 --- a/test/results/missing-args-partial-no-curl-expected.txt +++ b/test/results/missing-args-partial-no-curl-expected.txt @@ -27,7 +27,7 @@ Flags: -h, --help help for protocurl --in string Specifies, in which format the input -d should be interpreted in. 'text' (default) uses the Protobuf text format and 'json' uses JSON. The type is inferred as JSON if the first token is a '{'. -F, --infer-files Infer the correct files containing the relevant protobuf messages. All proto files in the proto directory provided by -I will be used. If no -f is provided, this -F is set and the files are inferred. - -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on on to curl optimistically. (default "POST") + -X, --method string HTTP request method. POST and GET are explicitly supported. Other methods are passed on to curl optimistically. (default "POST") --no-curl Forces the use of the built-in internal http request instead of curl. -n, --no-default-headers Default headers (e.g. "Content-Type") will not be passed to curl. Assumes --curl. Use "-n -H 'Content-Type: FooBar'" to override the default content type. --out string Produces the output in the specified format. 'text' (default) produces Protobuf text format. 'json' produces dense JSON and 'json:pretty' produces pretty-printed JSON. The produced JSON always uses the original Protobuf field names instead of lowerCamelCasing them. diff --git a/test/results/missing-curl-header-args-not-possible--X_GET-expected.txt b/test/results/missing-curl-header-args-not-possible--X_GET-expected.txt index fd02c8f..0f6ec54 100644 --- a/test/results/missing-curl-header-args-not-possible--X_GET-expected.txt +++ b/test/results/missing-curl-header-args-not-possible--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/missing-curl-header-args-not-possible-expected.txt b/test/results/missing-curl-header-args-not-possible-expected.txt index 37db346..97adf7d 100644 --- a/test/results/missing-curl-header-args-not-possible-expected.txt +++ b/test/results/missing-curl-header-args-not-possible-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/missing-curl-no-curl--X_GET-expected.txt b/test/results/missing-curl-no-curl--X_GET-expected.txt index eac2dc3..31525e8 100644 --- a/test/results/missing-curl-no-curl--X_GET-expected.txt +++ b/test/results/missing-curl-no-curl--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/missing-curl-no-curl-expected.txt b/test/results/missing-curl-no-curl-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/missing-curl-no-curl-expected.txt +++ b/test/results/missing-curl-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/moved-curl--X_GET-expected.txt b/test/results/moved-curl--X_GET-expected.txt index aa823da..6774583 100644 --- a/test/results/moved-curl--X_GET-expected.txt +++ b/test/results/moved-curl--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/moved-curl-expected.txt b/test/results/moved-curl-expected.txt index cc5704f..14df9d5 100644 --- a/test/results/moved-curl-expected.txt +++ b/test/results/moved-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/results/no-default-headers-with-custom-content-type-header--X_GET-expected.txt b/test/results/no-default-headers-with-custom-content-type-header--X_GET-expected.txt index 4fd581e..00676dd 100644 --- a/test/results/no-default-headers-with-custom-content-type-header--X_GET-expected.txt +++ b/test/results/no-default-headers-with-custom-content-type-header--X_GET-expected.txt @@ -230,7 +230,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -258,7 +258,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:58:55 GMT +Date: Thu, 05 Oct 2023 09:18:38 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/no-default-headers-with-custom-content-type-header-expected.txt b/test/results/no-default-headers-with-custom-content-type-header-expected.txt index a716f12..fab55a3 100644 --- a/test/results/no-default-headers-with-custom-content-type-header-expected.txt +++ b/test/results/no-default-headers-with-custom-content-type-header-expected.txt @@ -230,7 +230,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -258,7 +258,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:51 GMT +Date: Thu, 05 Oct 2023 09:18:38 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/no-default-headers-with-no-additional-headers--X_GET-expected.txt b/test/results/no-default-headers-with-no-additional-headers--X_GET-expected.txt index 59e2968..eaed5e9 100644 --- a/test/results/no-default-headers-with-no-additional-headers--X_GET-expected.txt +++ b/test/results/no-default-headers-with-no-additional-headers--X_GET-expected.txt @@ -228,7 +228,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -254,7 +254,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:58:48 GMT +Date: Thu, 05 Oct 2023 09:18:37 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/no-default-headers-with-no-additional-headers-expected.txt b/test/results/no-default-headers-with-no-additional-headers-expected.txt index 5d836ae..b1c3671 100644 --- a/test/results/no-default-headers-with-no-additional-headers-expected.txt +++ b/test/results/no-default-headers-with-no-additional-headers-expected.txt @@ -228,7 +228,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -254,7 +254,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:50 GMT +Date: Thu, 05 Oct 2023 09:18:37 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/no-default-headers-with-no-curl-flag--X_GET-expected.txt b/test/results/no-default-headers-with-no-curl-flag--X_GET-expected.txt index 1ddbfe6..d46e7d6 100644 --- a/test/results/no-default-headers-with-no-curl-flag--X_GET-expected.txt +++ b/test/results/no-default-headers-with-no-curl-flag--X_GET-expected.txt @@ -228,7 +228,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/no-default-headers-with-no-curl-flag-expected.txt b/test/results/no-default-headers-with-no-curl-flag-expected.txt index d319668..9f3242b 100644 --- a/test/results/no-default-headers-with-no-curl-flag-expected.txt +++ b/test/results/no-default-headers-with-no-curl-flag-expected.txt @@ -228,7 +228,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/no-reason--X_GET-expected.txt b/test/results/no-reason--X_GET-expected.txt index eaf4ab5..0d85e85 100644 --- a/test/results/no-reason--X_GET-expected.txt +++ b/test/results/no-reason--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/no-reason-curl-expected.txt b/test/results/no-reason-curl-expected.txt index 0c55396..4a2982a 100644 --- a/test/results/no-reason-curl-expected.txt +++ b/test/results/no-reason-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/no-reason-expected.txt b/test/results/no-reason-expected.txt index 0c55396..4a2982a 100644 --- a/test/results/no-reason-expected.txt +++ b/test/results/no-reason-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days--X_GET-expected.txt b/test/results/other-days-are-happy-days--X_GET-expected.txt index 97dfb61..67ecec3 100644 --- a/test/results/other-days-are-happy-days--X_GET-expected.txt +++ b/test/results/other-days-are-happy-days--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days-expected.txt b/test/results/other-days-are-happy-days-expected.txt index b9cfe5f..42c47d4 100644 --- a/test/results/other-days-are-happy-days-expected.txt +++ b/test/results/other-days-are-happy-days-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days-moved-protofiles--X_GET-expected.txt b/test/results/other-days-are-happy-days-moved-protofiles--X_GET-expected.txt index 97dfb61..67ecec3 100644 --- a/test/results/other-days-are-happy-days-moved-protofiles--X_GET-expected.txt +++ b/test/results/other-days-are-happy-days-moved-protofiles--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days-moved-protofiles-expected.txt b/test/results/other-days-are-happy-days-moved-protofiles-expected.txt index b9cfe5f..42c47d4 100644 --- a/test/results/other-days-are-happy-days-moved-protofiles-expected.txt +++ b/test/results/other-days-are-happy-days-moved-protofiles-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days-moved-protofiles-no-curl-expected.txt b/test/results/other-days-are-happy-days-moved-protofiles-no-curl-expected.txt index b9cfe5f..42c47d4 100644 --- a/test/results/other-days-are-happy-days-moved-protofiles-no-curl-expected.txt +++ b/test/results/other-days-are-happy-days-moved-protofiles-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/other-days-are-happy-days-no-curl-expected.txt b/test/results/other-days-are-happy-days-no-curl-expected.txt index b9cfe5f..42c47d4 100644 --- a/test/results/other-days-are-happy-days-no-curl-expected.txt +++ b/test/results/other-days-are-happy-days-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/response-type-arg-inferred-decode-raw--X_GET-expected.txt b/test/results/response-type-arg-inferred-decode-raw--X_GET-expected.txt index ff8f4c4..dcf43a2 100644 --- a/test/results/response-type-arg-inferred-decode-raw--X_GET-expected.txt +++ b/test/results/response-type-arg-inferred-decode-raw--X_GET-expected.txt @@ -237,7 +237,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Request Binary =========================== >>> 00000000 10 01 |..| @@ -260,7 +260,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:52:03 GMT +Date: Thu, 05 Oct 2023 09:17:35 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/response-type-arg-inferred-decode-raw-expected.txt b/test/results/response-type-arg-inferred-decode-raw-expected.txt index cb10960..b99f132 100644 --- a/test/results/response-type-arg-inferred-decode-raw-expected.txt +++ b/test/results/response-type-arg-inferred-decode-raw-expected.txt @@ -237,7 +237,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Request Binary =========================== >>> 00000000 10 01 |..| @@ -260,7 +260,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:24 GMT +Date: Thu, 05 Oct 2023 09:17:35 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/response-type-arg-overidden-decode-raw--X_GET-expected.txt b/test/results/response-type-arg-overidden-decode-raw--X_GET-expected.txt index e0709e2..c7383e5 100644 --- a/test/results/response-type-arg-overidden-decode-raw--X_GET-expected.txt +++ b/test/results/response-type-arg-overidden-decode-raw--X_GET-expected.txt @@ -236,7 +236,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Request Binary =========================== >>> 00000000 10 01 |..| @@ -259,7 +259,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:24 GMT +Date: Thu, 05 Oct 2023 09:17:36 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/response-type-arg-overidden-decode-raw-expected.txt b/test/results/response-type-arg-overidden-decode-raw-expected.txt index 3e98f68..1bb125f 100644 --- a/test/results/response-type-arg-overidden-decode-raw-expected.txt +++ b/test/results/response-type-arg-overidden-decode-raw-expected.txt @@ -236,7 +236,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Request Binary =========================== >>> 00000000 10 01 |..| @@ -259,7 +259,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:24 GMT +Date: Thu, 05 Oct 2023 09:17:36 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/text-in--X_GET-expected.txt b/test/results/text-in--X_GET-expected.txt index cfd42d9..6d6f091 100644 --- a/test/results/text-in--X_GET-expected.txt +++ b/test/results/text-in--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/text-in-expected.txt b/test/results/text-in-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/text-in-expected.txt +++ b/test/results/text-in-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/text-in-json-output--X_GET-expected.txt b/test/results/text-in-json-output--X_GET-expected.txt index 48f2623..1a24fc4 100644 --- a/test/results/text-in-json-output--X_GET-expected.txt +++ b/test/results/text-in-json-output--X_GET-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -262,7 +262,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:53:25 GMT +Date: Thu, 05 Oct 2023 09:17:47 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/text-in-json-output-expected.txt b/test/results/text-in-json-output-expected.txt index a4c0ece..020dbf3 100644 --- a/test/results/text-in-json-output-expected.txt +++ b/test/results/text-in-json-output-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 @@ -262,7 +262,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:29 GMT +Date: Thu, 05 Oct 2023 09:17:47 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 diff --git a/test/results/tmp-file-permissions-readable--X_GET-expected.txt b/test/results/tmp-file-permissions-readable--X_GET-expected.txt index 725a198..815209f 100644 --- a/test/results/tmp-file-permissions-readable--X_GET-expected.txt +++ b/test/results/tmp-file-permissions-readable--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> -rw-r--r-- =========================== GET Response Text =========================== <<< diff --git a/test/results/tmp-file-permissions-readable-expected.txt b/test/results/tmp-file-permissions-readable-expected.txt index 7d8a2a4..44518d6 100644 --- a/test/results/tmp-file-permissions-readable-expected.txt +++ b/test/results/tmp-file-permissions-readable-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> -rw-r--r-- =========================== POST Response Text =========================== <<< diff --git a/test/results/unknown-message-as-text--X_GET-expected.txt b/test/results/unknown-message-as-text--X_GET-expected.txt index 099dcf1..6b8ea98 100644 --- a/test/results/unknown-message-as-text--X_GET-expected.txt +++ b/test/results/unknown-message-as-text--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> includeReason: true =========================== GET Response Text =========================== <<< 1: 1 diff --git a/test/results/unknown-message-as-text-expected.txt b/test/results/unknown-message-as-text-expected.txt index fbf0cb6..2cabdf3 100644 --- a/test/results/unknown-message-as-text-expected.txt +++ b/test/results/unknown-message-as-text-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> includeReason: true =========================== POST Response Text =========================== <<< 1: 1 diff --git a/test/results/verbose-custom-headers--X_GET-expected.txt b/test/results/verbose-custom-headers--X_GET-expected.txt index cfb7b7b..35758e6 100644 --- a/test/results/verbose-custom-headers--X_GET-expected.txt +++ b/test/results/verbose-custom-headers--X_GET-expected.txt @@ -237,7 +237,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -268,7 +268,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:54:40 GMT +Date: Thu, 05 Oct 2023 09:17:56 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/verbose-custom-headers-expected.txt b/test/results/verbose-custom-headers-expected.txt index c25a61c..387a419 100644 --- a/test/results/verbose-custom-headers-expected.txt +++ b/test/results/verbose-custom-headers-expected.txt @@ -237,7 +237,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -268,7 +268,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:33 GMT +Date: Thu, 05 Oct 2023 09:17:55 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/verbose-expected.txt b/test/results/verbose-expected.txt index e1fa9ff..0a93e27 100644 --- a/test/results/verbose-expected.txt +++ b/test/results/verbose-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -258,7 +258,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:32 GMT +Date: Thu, 05 Oct 2023 09:17:54 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/verbose-long-args-equals-args--X_GET-expected.txt b/test/results/verbose-long-args-equals-args--X_GET-expected.txt index d442e05..2273cb1 100644 --- a/test/results/verbose-long-args-equals-args--X_GET-expected.txt +++ b/test/results/verbose-long-args-equals-args--X_GET-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -258,7 +258,7 @@ Total curl args: =========================== GET Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Wed, 04 Oct 2023 08:54:32 GMT +Date: Thu, 05 Oct 2023 09:17:55 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/verbose-long-args-equals-args-expected.txt b/test/results/verbose-long-args-equals-args-expected.txt index 560ff2e..38f1e2e 100644 --- a/test/results/verbose-long-args-equals-args-expected.txt +++ b/test/results/verbose-long-args-equals-args-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -258,7 +258,7 @@ Total curl args: =========================== POST Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:33 GMT +Date: Thu, 05 Oct 2023 09:17:55 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 diff --git a/test/results/verbose-missing-curl--X_GET-expected.txt b/test/results/verbose-missing-curl--X_GET-expected.txt index 8f4c517..4c46b6c 100644 --- a/test/results/verbose-missing-curl--X_GET-expected.txt +++ b/test/results/verbose-missing-curl--X_GET-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 diff --git a/test/results/verbose-missing-curl-expected.txt b/test/results/verbose-missing-curl-expected.txt index 4531e7e..6524d3b 100644 --- a/test/results/verbose-missing-curl-expected.txt +++ b/test/results/verbose-missing-curl-expected.txt @@ -235,7 +235,7 @@ Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] Searching for message with base name: HappyDayRequest Resolved message package-paths for name HappyDayRequest: [happyday.HappyDayRequest] -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -250,7 +250,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:34 GMT +Date: Thu, 05 Oct 2023 09:17:57 GMT Keep-Alive: timeout=5 =========================== POST Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | diff --git a/test/results/verbose-no-curl-expected.txt b/test/results/verbose-no-curl-expected.txt index 3d7944f..5dffeda 100644 --- a/test/results/verbose-no-curl-expected.txt +++ b/test/results/verbose-no-curl-expected.txt @@ -231,7 +231,7 @@ file: { } Looking up message with full name: happyday.HappyDayRequest Looking up message with full name: happyday.HappyDayRequest -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1642044939 nanos: 152000000 @@ -246,7 +246,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Tue, 03 Oct 2023 20:42:32 GMT +Date: Thu, 05 Oct 2023 09:17:54 GMT Keep-Alive: timeout=5 =========================== POST Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | diff --git a/test/results/wednesday-is-not-a-happy-day--X_GET-expected.txt b/test/results/wednesday-is-not-a-happy-day--X_GET-expected.txt index cfd42d9..6d6f091 100644 --- a/test/results/wednesday-is-not-a-happy-day--X_GET-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/wednesday-is-not-a-happy-day--X_POST-expected.txt b/test/results/wednesday-is-not-a-happy-day--X_POST-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/wednesday-is-not-a-happy-day--X_POST-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day--X_POST-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/wednesday-is-not-a-happy-day-expected.txt b/test/results/wednesday-is-not-a-happy-day-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/wednesday-is-not-a-happy-day-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/wednesday-is-not-a-happy-day-json--X_GET-expected.txt b/test/results/wednesday-is-not-a-happy-day-json--X_GET-expected.txt index 8d555cc..3bef0ab 100644 --- a/test/results/wednesday-is-not-a-happy-day-json--X_GET-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-json--X_GET-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request JSON =========================== >>> +=========================== GET Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== GET Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/wednesday-is-not-a-happy-day-json-expected.txt b/test/results/wednesday-is-not-a-happy-day-json-expected.txt index 255ceab..1b62767 100644 --- a/test/results/wednesday-is-not-a-happy-day-json-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-json-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== POST Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/wednesday-is-not-a-happy-day-json-no-curl-expected.txt b/test/results/wednesday-is-not-a-happy-day-json-no-curl-expected.txt index 255ceab..1b62767 100644 --- a/test/results/wednesday-is-not-a-happy-day-json-no-curl-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-json-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request JSON =========================== >>> +=========================== POST Request JSON =========================== >>> {"date":"2022-03-23T14:15:39Z","includeReason":true} =========================== POST Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} diff --git a/test/results/wednesday-is-not-a-happy-day-no-curl-expected.txt b/test/results/wednesday-is-not-a-happy-day-no-curl-expected.txt index 03ff6fa..7f419a9 100644 --- a/test/results/wednesday-is-not-a-happy-day-no-curl-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-no-curl-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> date: { seconds: 1648044939 nanos: 152000000 diff --git a/test/results/without-input--X_GET_--no-curl-expected.txt b/test/results/without-input--X_GET_--no-curl-expected.txt new file mode 100644 index 0000000..61f5efa --- /dev/null +++ b/test/results/without-input--X_GET_--no-curl-expected.txt @@ -0,0 +1,6 @@ +######### STDOUT ######### +=========================== GET Response Text =========================== <<< +isHappyDay: true +formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" +######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/without-input--X_GET_-i___HappyDayRequest-expected.txt b/test/results/without-input--X_GET_-i___HappyDayRequest-expected.txt index 6a5ed85..eafdcb3 100644 --- a/test/results/without-input--X_GET_-i___HappyDayRequest-expected.txt +++ b/test/results/without-input--X_GET_-i___HappyDayRequest-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== GET Request Text =========================== >>> +=========================== GET Request Text =========================== >>> =========================== GET Response Text =========================== <<< isHappyDay: true diff --git a/test/results/without-input--i___HappyDayRequest-expected.txt b/test/results/without-input--i___HappyDayRequest-expected.txt index 1c3e656..e236c08 100644 --- a/test/results/without-input--i___HappyDayRequest-expected.txt +++ b/test/results/without-input--i___HappyDayRequest-expected.txt @@ -1,5 +1,5 @@ ######### STDOUT ######### -=========================== POST Request Text =========================== >>> +=========================== POST Request Text =========================== >>> =========================== POST Response Text =========================== <<< isHappyDay: true diff --git a/test/servers/server.ts b/test/servers/server.ts index 9557359..cd6c9ce 100644 --- a/test/servers/server.ts +++ b/test/servers/server.ts @@ -15,11 +15,6 @@ let HappyDayResponseType: protobuf.Type; const weekdays = ['Sunday', 'Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday', 'Saturday']; const wednesdayDateWeekday = 3; -const CONSTANT_RESPONSE = { - isHappyDay: false, - reason: "Just a constant response", -} - // these would be usually automatically generated interface HappyDayRequest { date: { @@ -49,8 +44,6 @@ interface PathHandler { handler(reqDecoded: { [p in string]: any }): Promise<[protobuf.Type, { [p in string]: any }]>; } -// todo. update handler doc here with new paths - /** * Defines two paths. * diff --git a/test/suite/testcases.json b/test/suite/testcases.json index 74c3131..9404eee 100644 --- a/test/suite/testcases.json +++ b/test/suite/testcases.json @@ -114,6 +114,7 @@ ], "rerunwithArgForEachElement": [ "-X GET", + "-X GET --no-curl", "-i ..HappyDayRequest", "-X GET -i ..HappyDayRequest" ]