From 01d2ed56e9e0e2657474f0b190407985e55d9f4b Mon Sep 17 00:00:00 2001 From: qa-swaneet-sahoo Date: Mon, 25 Apr 2022 12:35:58 +0200 Subject: [PATCH 1/5] Provide linux packages deb and .apk. --- .github/workflows/release.yml | 44 +++++++++++++++++--- README.md | 6 +-- doc/template.README.md | 6 +-- release/source.sh | 2 + template.goreleaser.yaml | 53 ++++++++++++++++++++++++- test/suite/linux/install-test-remove.sh | 25 ++++++++++++ test/suite/linux/package-alpine.sh | 43 ++++++++++++++++++++ test/suite/linux/package-debian.sh | 24 +++++++++++ test/suite/native-tests.ps1 | 27 +++++++++---- 9 files changed, 210 insertions(+), 20 deletions(-) create mode 100755 test/suite/linux/install-test-remove.sh create mode 100644 test/suite/linux/package-alpine.sh create mode 100755 test/suite/linux/package-debian.sh diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7e7414d..2ecf64d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -149,7 +149,7 @@ jobs: post-release-test-windows: runs-on: windows-latest - needs: [release] + needs: [ release ] steps: - uses: actions/checkout@v3 @@ -190,11 +190,11 @@ jobs: - name: Test extracted release and global installation run: | $ErrorActionPreference = "Stop" - & ".\test\suite\native-tests.ps1" "./my-protocurl" ".exe" + & ".\test\suite\native-tests.ps1" "my-protocurl" ".exe" "localDirTests" post-release-test-mac: runs-on: macos-latest - needs: [release] + needs: [ release ] steps: - uses: actions/checkout@v3 - name: Setup @@ -216,9 +216,9 @@ jobs: sed "s/x86_64/amd64/g" | sed "s/x86_32/386/g" | sed "s/aarch_64/arm64/g")" - echo "arch: $ARCH" + echo "Arch: $ARCH" gh release download v${{ github.event.inputs.version }} --pattern "*darwin*$ARCH*.zip" - echo "working dir after download" + echo "Working dir after Download" ls echo "Attempting to extract" unzip *.zip -d my-protocurl @@ -232,4 +232,36 @@ jobs: - name: Test extracted release and global installation run: | - pwsh test/suite/native-tests.ps1 "./my-protocurl" "" + pwsh test/suite/native-tests.ps1 "my-protocurl" "" "localDirTests" + + post-release-test-linux: + runs-on: ubuntu-latest + needs: [ release ] + steps: + - uses: actions/checkout@v3 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v3 + with: + node-version: "17.7.2" + + - name: Start test server + run: | + cd test + pwsh servers/native-start-server.ps1 + + - name: "Run tests for linux package formats: deb, apk" + run: | + ARCH="$(uname -m | + sed "s/x86_64/amd64/g" | + sed "s/x86_32/386/g" | + sed "s/aarch_64/arm64/g")" + URL_NO_EXT="https://github.com/qaware/protocurl/releases/download/v${{github.event.inputs.version}}/protocurl_${{github.event.inputs.version}}_linux_${ARCH}" + + docker run --network host -v $PWD/test:/home/test alpine:latest sh -c \ + "cd home; apk add --no-cache bash && bash ./test/suite/linux/install-test-remove.sh alpine .apk $URL_NO_EXT" + + docker run --network host -v $PWD/test:/home/test debian:stable-slim bash -c \ + "cd home; ./test/suite/linux/install-test-remove.sh debian .deb $URL_NO_EXT" + diff --git a/README.md b/README.md index 69db5c6..5d4da65 100644 --- a/README.md +++ b/README.md @@ -25,9 +25,9 @@ configurable http requests. Otherwise `protocurl` will use a simple non-configur #### Native CLI 1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases -2. Extract the archive into a folder, e.g. `/usr/local/protocurl`. -3. Add symlink to the binary in the folder. e.g. `ln -s /usr/local/protocurl/bin/protocurl /usr/local/bin/protocurl` - Or add the binary folder `/usr/local/protocurl/bin` to your system-wide path. +2. Extract the archive into a folder, e.g. `/opt/protocurl`. +3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl` + Or add the binary folder `/opt/protocurl/bin` to your system-wide path. 4. Test that it works via `protocurl -h` #### Docker diff --git a/doc/template.README.md b/doc/template.README.md index edfe846..35f2a0d 100644 --- a/doc/template.README.md +++ b/doc/template.README.md @@ -25,9 +25,9 @@ configurable http requests. Otherwise `protocurl` will use a simple non-configur #### Native CLI 1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases -2. Extract the archive into a folder, e.g. `/usr/local/protocurl`. -3. Add symlink to the binary in the folder. e.g. `ln -s /usr/local/protocurl/bin/protocurl /usr/local/bin/protocurl` - Or add the binary folder `/usr/local/protocurl/bin` to your system-wide path. +2. Extract the archive into a folder, e.g. `/opt/protocurl`. +3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl` + Or add the binary folder `/opt/protocurl/bin` to your system-wide path. 4. Test that it works via `protocurl -h` #### Docker diff --git a/release/source.sh b/release/source.sh index 07494e1..7bdb9de 100755 --- a/release/source.sh +++ b/release/source.sh @@ -1,6 +1,8 @@ #!/bin/bash set -e +# PRECONDITION: git fetch origin --tags + source ./release/0-get-latest-dependencies-versions.sh # should be one of 386, amd64 and arm64 diff --git a/template.goreleaser.yaml b/template.goreleaser.yaml index ffa3734..72bab77 100644 --- a/template.goreleaser.yaml +++ b/template.goreleaser.yaml @@ -1,7 +1,7 @@ # Documentation at https://goreleaser.com # This file is a template and expressions such as __PROTOC_VERSION__ are replaced -# with envrionment variables such as $PROTOC_VERSION before usage. +# with environment variables such as $PROTOC_VERSION before usage. # https://goreleaser.com/customization/build/ builds: @@ -23,6 +23,7 @@ builds: archives: - format: zip files: + # NOTE: These files are listed again in the packages below. Keep them synced! # binary is added implicitly - README.md - LICENSE.md @@ -34,6 +35,56 @@ archives: dst: 'protocurl-internal/include/google/protobuf' strip_parent: true +# Linux packages +nfpms: + - package_name: protocurl + description: |- + protoCURL is cURL for Protobuf: + The command-line tool for interacting with Protobuf over + HTTP REST endpoints using human-readable text formats. + + homepage: https://github.com/qaware/protocurl + license: MIT + maintainer: GollyTicker + priority: extra + + formats: + - apk + - deb + dependencies: + - curl + suggests: + - curl + + overrides: + # protoc is compiled against glibc whereas alpine uses musl. + # See: https://stackoverflow.com/a/64447927 + apk: + dependencies: + - curl + - gcompat + + # adds the ./bin/protocurl + bindir: /opt/protocurl + + # GoReleaser will automatically add the binaries. + contents: + - src: /opt/protocurl/bin/protocurl + dst: /usr/bin/protocurl + type: "symlink" + + # NOTE: These files are listed again in the archives above. Keep them synced! + # binary is added implicitly + - src: README.md + dst: /opt/protocurl/README.md + - src: LICENSE.md + dst: /opt/protocurl/LICENSE.md + # copy protoc binaries and their .proto files previously downloaded + - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/bin' + dst: '/opt/protocurl/protocurl-internal/bin' + - src: 'release/tmp/protoc-__PROTO_VERSION__-{{ .Os }}-{{ .Arch }}/include/google/protobuf' + dst: '/opt/protocurl/protocurl-internal/include/google/protobuf' + release: # If set to auto, will mark the release as not ready for production # in case there is an indicator for this in the tag e.g. v1.0.0-rc1 diff --git a/test/suite/linux/install-test-remove.sh b/test/suite/linux/install-test-remove.sh new file mode 100755 index 0000000..bebdefc --- /dev/null +++ b/test/suite/linux/install-test-remove.sh @@ -0,0 +1,25 @@ +#!/bin/bash +set -e + +# should be run inside ./test folder within a container to test packaged linux releases + +OS_NAME="$1" +EXT="$2" +URL_NO_EXT="$3" + +source "./test/suite/linux/package-${OS_NAME}.sh" + +setup + +install "$URL_NO_EXT$EXT" + +pwsh test/suite/native-tests.ps1 "/opt/protocurl" "" "isNotLocalDirTests" + +# Overriding installation does not break +install "$URL" + +pwsh test/suite/native-tests.ps1 "/opt/protocurl" "" "isNotLocalDirTests" + +remove + +[[ "$(which protocurl)" == "" ]] diff --git a/test/suite/linux/package-alpine.sh b/test/suite/linux/package-alpine.sh new file mode 100644 index 0000000..9a41149 --- /dev/null +++ b/test/suite/linux/package-alpine.sh @@ -0,0 +1,43 @@ +#!/bin/bash +set -e +set -x + +setup() { + # Install powershell + curl + gcompat + + apk add --no-cache curl gcompat \ + ca-certificates \ + less \ + ncurses-terminfo-base \ + krb5-libs \ + libgcc \ + libintl \ + libssl1.1 \ + libstdc++ \ + tzdata \ + userspace-rcu \ + zlib \ + icu-libs + + apk -X https://dl-cdn.alpinelinux.org/alpine/edge/main add --no-cache lttng-ust + # todo. auto-updating url? + curl -L https://github.com/PowerShell/PowerShell/releases/download/v7.2.2/powershell-7.2.2-linux-alpine-x64.tar.gz -o /tmp/powershell.tar.gz + mkdir -p /opt/microsoft/powershell/7 + tar zxf /tmp/powershell.tar.gz -C /opt/microsoft/powershell/7 + chmod +x /opt/microsoft/powershell/7/pwsh + ln -s /opt/microsoft/powershell/7/pwsh /usr/bin/pwsh +} +export -f setup + +install() { + URL="$1" + curl -sL -o protocurl.apk "$URL" + ls /home + apk add --allow-untrusted protocurl.apk +} +export -f install + +remove() { + apk del protocurl +} +export -f remove \ No newline at end of file diff --git a/test/suite/linux/package-debian.sh b/test/suite/linux/package-debian.sh new file mode 100755 index 0000000..3ad3439 --- /dev/null +++ b/test/suite/linux/package-debian.sh @@ -0,0 +1,24 @@ +#!/bin/bash +set -e + +setup() { + apt-get update -q + apt-get install -q -y curl gnupg apt-transport-https + curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - + sh -c 'echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-bullseye-prod bullseye main" > /etc/apt/sources.list.d/microsoft.list' + apt-get update -q && apt-get install -y powershell +} +export -f setup + +install() { + URL="$1" + curl -sL -o protocurl.deb "$URL" + ls /home + dpkg --install protocurl.deb +} +export -f install + +remove() { + dpkg --remove protocurl +} +export -f remove \ No newline at end of file diff --git a/test/suite/native-tests.ps1 b/test/suite/native-tests.ps1 index b364098..b3b2923 100644 --- a/test/suite/native-tests.ps1 +++ b/test/suite/native-tests.ps1 @@ -4,8 +4,14 @@ $ErrorActionPreference = "Stop" $pc = $args[0] $ExeExt = $args[1] +$testFromLocalDirInstallation = $args[2] -Write-Output "========= Running native tests =========" +function AbortIfCommandFailed +{ + if ($LASTEXITCODE -ne 0) { + throw "Exit code is $LASTEXITCODE" + } +} function Run-Tests { @@ -17,11 +23,13 @@ function Run-Tests Write-Output "=== Executable is runnable ===" &"$ProtocurlExec" -h + AbortIfCommandFailed Write-Output "=== Base scenario runs. protoc$ExeExt is found and used. protocurl-internal is found and used ===" &"$ProtocurlExec" -I test/proto ` -f happyday.proto -i happyday.HappyDayRequest -o happyday.HappyDayResponse ` -u http://localhost:8080/happy-day/verify -d "includeReason: true" + AbortIfCommandFailed Write-Output "=== Using custom protoc and proto lib and global curl ===" if (Test-Path my-protoc) { @@ -37,18 +45,23 @@ function Run-Tests --protoc-path my-protoc/my-bin/protoc -I my-protoc/my-protos ` -f happyday.proto -i happyday.HappyDayRequest -o happyday.HappyDayResponse ` -u http://localhost:8080/happy-day/verify -d "includeReason: true" + AbortIfCommandFailed } -Run-Tests("./$pc/bin/protocurl$ExeExt") +Write-Output "========= Running native tests =========" + +if ($testFromLocalDirInstallation -eq "localDirTests") { + Run-Tests("./$pc/bin/protocurl$ExeExt") -Write-Output "Installing protocurl into PATH and re-executing..." + Write-Output "Installing protocurl into PATH and re-executing..." -$EnvPathSeparator = "$( [IO.Path]::PathSeparator )" -# ; on windows, : on unix + $EnvPathSeparator = "$( [IO.Path]::PathSeparator )" + # ; on windows, : on unix -$Env:PATH += "$EnvPathSeparator$PWD/$pc/bin" + $Env:PATH += "$EnvPathSeparator$PWD/$pc/bin" -Write-Output "Path after installation: $Env:PATH" + Write-Output "Path after installation: $Env:PATH" +} Run-Tests("protocurl") From 819c7b8250381ef8177684b9e31813d0425d74e7 Mon Sep 17 00:00:00 2001 From: qa-swaneet-sahoo Date: Tue, 26 Apr 2022 11:35:59 +0200 Subject: [PATCH 2/5] Skip announce for pre-releases. --- release/30-build-go-archive.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/release/30-build-go-archive.sh b/release/30-build-go-archive.sh index 9a6c584..6e2052f 100755 --- a/release/30-build-go-archive.sh +++ b/release/30-build-go-archive.sh @@ -12,7 +12,12 @@ goreleaser check echo "Using GORELEASER_CURRENT_TAG=$GORELEASER_CURRENT_TAG, GORELEASER_PREVIOUS_TAG=$GORELEASER_PREVIOUS_TAG" -goreleaser release --rm-dist +GORELEASER_ARGS="" +if [[ "$SNAPSHOT" == "true" ]]; then + GORELEASER_ARGS="--skip-announce" +fi + +goreleaser release --rm-dist $GORELEASER_ARGS # Alternate commands when testing release process locally # goreleaser release --snapshot --rm-dist # DEV From 7e938f253d51967692feac7ef2b6b7da197b48ee Mon Sep 17 00:00:00 2001 From: qa-swaneet-sahoo Date: Wed, 27 Apr 2022 00:48:01 +0200 Subject: [PATCH 3/5] Exit with non-zero exitcode on error --- EXAMPLES.md | 4 ++-- doc/template.EXAMPLES.md | 2 +- src/protocurl.go | 2 ++ test/results/additional-curl-args-expected.txt | 3 ++- test/results/additional-curl-args-no-curl-expected.txt | 1 + test/results/additional-curl-args-verbose-expected.txt | 5 +++-- test/results/display-binary-and-headers-expected.txt | 3 ++- test/results/display-binary-and-headers-no-curl-expected.txt | 3 ++- test/results/echo-empty-expected.txt | 1 + test/results/echo-empty-no-curl-expected.txt | 1 + test/results/echo-empty-with-curl-args-expected.txt | 3 ++- test/results/echo-empty-with-curl-args-no-curl-expected.txt | 1 + test/results/echo-filled-expected.txt | 1 + test/results/echo-filled-no-curl-expected.txt | 1 + test/results/echo-full-expected.txt | 1 + test/results/echo-full-json-expected.txt | 1 + test/results/echo-full-no-curl-expected.txt | 1 + test/results/echo-quiet-expected.txt | 1 + test/results/echo-quiet-no-curl-expected.txt | 1 + test/results/empty-day-epoch-time-thursday-expected.txt | 1 + .../empty-day-epoch-time-thursday-missing-curl-expected.txt | 1 + ...day-epoch-time-thursday-missing-curl-no-curl-expected.txt | 1 + .../empty-day-epoch-time-thursday-no-curl-expected.txt | 1 + test/results/failure-simple-expected.txt | 1 + test/results/failure-simple-no-curl-expected.txt | 1 + test/results/failure-simple-quiet-expected.txt | 1 + test/results/failure-simple-quiet-no-curl-expected.txt | 1 + test/results/far-future-expected.txt | 1 + test/results/far-future-json--v-expected.txt | 3 ++- test/results/far-future-json-expected.txt | 1 + test/results/far-future-no-curl-expected.txt | 1 + test/results/global-protoc-and-lib-expected.txt | 1 + test/results/global-protoc-expected.txt | 1 + test/results/help-expected.txt | 1 + test/results/help-missing-curl-expected.txt | 1 + test/results/help-missing-curl-no-curl-expected.txt | 1 + test/results/help-no-curl-expected.txt | 1 + test/results/in-wrong-expected.txt | 1 + .../results/infer-files-provide-file-wrong-args-expected.txt | 1 + test/results/inferred-message-package-path-expected.txt | 3 ++- ...sage-package-path-name-clash-ambiguous-error-expected.txt | 1 + ...essage-package-path-name-clash-explicit-path-expected.txt | 3 ++- .../inferred-message-package-path-nested-expected.txt | 1 + .../inferred-message-package-path-nested-subdir-expected.txt | 1 + test/results/inferred-proto-file--F-expected.txt | 1 + test/results/inferred-proto-file-expected.txt | 1 + .../inferred-proto-file-message-package-path-expected.txt | 1 + test/results/invalid-protofile-dir-expected.txt | 1 + test/results/invalid-protofile-path-expected.txt | 1 + test/results/json-in-expected.txt | 1 + test/results/json-in-proper-proto-names-expected.txt | 1 + test/results/json-in-text-output-expected.txt | 3 ++- test/results/json-in-wrong-arg-expected.txt | 1 + test/results/json-out-pretty-expected.txt | 1 + test/results/message-package-path-nested-subdir-expected.txt | 1 + ...e-package-path-resolved-to-non-message-error-expected.txt | 1 + test/results/missing-args-expected.txt | 1 + test/results/missing-args-no-curl-expected.txt | 1 + test/results/missing-args-partial-expected.txt | 1 + test/results/missing-args-partial-no-curl-expected.txt | 1 + .../missing-curl-header-args-not-possible-expected.txt | 1 + test/results/missing-curl-no-curl-expected.txt | 1 + test/results/missing-protoc-expected.txt | 1 + test/results/missing-protoc-global-expected.txt | 1 + test/results/missing-protocurl-internal-expected.txt | 1 + test/results/moved-curl-expected.txt | 1 + test/results/moved-curl-no-curl-expected.txt | 1 + test/results/moved-lib-expected.txt | 1 + test/results/no-reason-curl-expected.txt | 1 + test/results/no-reason-expected.txt | 1 + test/results/other-days-are-happy-days-expected.txt | 1 + .../other-days-are-happy-days-moved-protofiles-expected.txt | 1 + ...days-are-happy-days-moved-protofiles-no-curl-expected.txt | 1 + test/results/other-days-are-happy-days-no-curl-expected.txt | 1 + test/results/out-wrong-expected.txt | 1 + test/results/quiet-with-content-expected.txt | 1 + test/results/quiet-with-content-no-curl-expected.txt | 1 + test/results/text-in-expected.txt | 1 + test/results/text-in-json-output-expected.txt | 3 ++- test/results/text-in-wrong-arg-expected.txt | 1 + test/results/unknown-base-message-name-error-expected.txt | 1 + test/results/unknown-message-package-path-error-expected.txt | 1 + test/results/verbose-custom-headers-expected.txt | 3 ++- test/results/verbose-custom-headers-no-curl-expected.txt | 1 + test/results/verbose-expected.txt | 3 ++- test/results/verbose-long-args-equals-args-expected.txt | 3 ++- test/results/verbose-missing-curl-expected.txt | 3 ++- test/results/verbose-no-curl-expected.txt | 3 ++- test/results/version-expected.txt | 1 + test/results/version-no-curl-expected.txt | 1 + test/results/wednesday-is-not-a-happy-day-expected.txt | 1 + test/results/wednesday-is-not-a-happy-day-json-expected.txt | 1 + .../wednesday-is-not-a-happy-day-json-no-curl-expected.txt | 1 + .../wednesday-is-not-a-happy-day-no-curl-expected.txt | 1 + test/suite/test.sh | 5 +++++ 95 files changed, 117 insertions(+), 19 deletions(-) diff --git a/EXAMPLES.md b/EXAMPLES.md index 2d0c0bb..15b7b5b 100644 --- a/EXAMPLES.md +++ b/EXAMPLES.md @@ -114,7 +114,7 @@ $ docker run -v "$PWD/test/proto:/proto" --network host qaware/protocurl \ -d "" ``` -will produce no output and only show this error: +will produce no output, exit with a non-zero exitcode and only show this error: ```bash Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found @@ -386,7 +386,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:43:47 GMT +Date: Tue, 26 Apr 2022 22:44:45 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 35 diff --git a/doc/template.EXAMPLES.md b/doc/template.EXAMPLES.md index bfbf178..5c0bab3 100644 --- a/doc/template.EXAMPLES.md +++ b/doc/template.EXAMPLES.md @@ -58,7 +58,7 @@ With `-q` all errors are written to stderr making it ideal for piping in scripts ___EXAMPLE_OUTPUT_ONLY_WITH_ERR_1___ ``` -will produce no output and only show this error: +will produce no output, exit with a non-zero exitcode and only show this error: ```bash ___EXAMPLE_OUTPUT_ONLY_WITH_ERR_2___ diff --git a/src/protocurl.go b/src/protocurl.go index 2678b2b..1aa7624 100644 --- a/src/protocurl.go +++ b/src/protocurl.go @@ -3,6 +3,7 @@ package main import ( "encoding/hex" "fmt" + "os" "github.com/spf13/cobra" "google.golang.org/protobuf/reflect/protoregistry" @@ -45,6 +46,7 @@ func main() { defer func() { if err := recover(); err != nil { PrintError(fmt.Errorf("%v", err)) + os.Exit(1) } }() PanicOnError(rootCmd.Execute()) diff --git a/test/results/additional-curl-args-expected.txt b/test/results/additional-curl-args-expected.txt index 6202aa5..d16063d 100644 --- a/test/results/additional-curl-args-expected.txt +++ b/test/results/additional-curl-args-expected.txt @@ -10,7 +10,7 @@ includeReason: true =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sun, 17 Apr 2022 23:33:23 GMT +Date: Tue, 26 Apr 2022 22:34:28 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -25,3 +25,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/additional-curl-args-no-curl-expected.txt b/test/results/additional-curl-args-no-curl-expected.txt index e626d0f..985f2dc 100644 --- a/test/results/additional-curl-args-no-curl-expected.txt +++ b/test/results/additional-curl-args-no-curl-expected.txt @@ -3,3 +3,4 @@ Error: Both --curl and --no-curl are active. I cannot use and not use curl. Please check the supplied and implied arguments via -v. +######### EXIT 1 ######### diff --git a/test/results/additional-curl-args-verbose-expected.txt b/test/results/additional-curl-args-verbose-expected.txt index 6996470..4c2580b 100644 --- a/test/results/additional-curl-args-verbose-expected.txt +++ b/test/results/additional-curl-args-verbose-expected.txt @@ -276,7 +276,7 @@ Total curl args: * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Sat, 23 Apr 2022 16:37:08 GMT +< Date: Tue, 26 Apr 2022 22:34:37 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 65 @@ -287,7 +287,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:37:08 GMT +Date: Tue, 26 Apr 2022 22:34:37 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -304,3 +304,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/display-binary-and-headers-expected.txt b/test/results/display-binary-and-headers-expected.txt index 6202aa5..449395c 100644 --- a/test/results/display-binary-and-headers-expected.txt +++ b/test/results/display-binary-and-headers-expected.txt @@ -10,7 +10,7 @@ includeReason: true =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sun, 17 Apr 2022 23:33:23 GMT +Date: Tue, 26 Apr 2022 22:34:21 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -25,3 +25,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 bec00b8..e59dee3 100644 --- a/test/results/display-binary-and-headers-no-curl-expected.txt +++ b/test/results/display-binary-and-headers-no-curl-expected.txt @@ -12,7 +12,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Sun, 17 Apr 2022 23:33:23 GMT +Date: Tue, 26 Apr 2022 22:34:24 GMT Keep-Alive: timeout=5 =========================== Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | @@ -25,3 +25,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-empty-expected.txt b/test/results/echo-empty-expected.txt index dd2535c..1cdcd5b 100644 --- a/test/results/echo-empty-expected.txt +++ b/test/results/echo-empty-expected.txt @@ -4,3 +4,4 @@ =========================== Response Text =========================== <<< ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-empty-no-curl-expected.txt b/test/results/echo-empty-no-curl-expected.txt index dd2535c..1cdcd5b 100644 --- a/test/results/echo-empty-no-curl-expected.txt +++ b/test/results/echo-empty-no-curl-expected.txt @@ -4,3 +4,4 @@ =========================== Response Text =========================== <<< ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-empty-with-curl-args-expected.txt b/test/results/echo-empty-with-curl-args-expected.txt index d7ee837..3d64f43 100644 --- a/test/results/echo-empty-with-curl-args-expected.txt +++ b/test/results/echo-empty-with-curl-args-expected.txt @@ -16,7 +16,7 @@ includeReason: true * Mark bundle as not supporting multiuse < HTTP/1.1 200 OK < Content-Type: application/x-protobuf -< Date: Mon, 18 Apr 2022 00:33:15 GMT +< Date: Tue, 26 Apr 2022 22:35:42 GMT < Connection: keep-alive < Keep-Alive: timeout=5 < Content-Length: 2 @@ -27,3 +27,4 @@ includeReason: true =========================== Response Text =========================== <<< includeReason: true ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-empty-with-curl-args-no-curl-expected.txt b/test/results/echo-empty-with-curl-args-no-curl-expected.txt index e626d0f..985f2dc 100644 --- a/test/results/echo-empty-with-curl-args-no-curl-expected.txt +++ b/test/results/echo-empty-with-curl-args-no-curl-expected.txt @@ -3,3 +3,4 @@ Error: Both --curl and --no-curl are active. I cannot use and not use curl. Please check the supplied and implied arguments via -v. +######### EXIT 1 ######### diff --git a/test/results/echo-filled-expected.txt b/test/results/echo-filled-expected.txt index d49f9ac..780e7b0 100644 --- a/test/results/echo-filled-expected.txt +++ b/test/results/echo-filled-expected.txt @@ -12,3 +12,4 @@ date: { } includeReason: true ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-filled-no-curl-expected.txt b/test/results/echo-filled-no-curl-expected.txt index d49f9ac..780e7b0 100644 --- a/test/results/echo-filled-no-curl-expected.txt +++ b/test/results/echo-filled-no-curl-expected.txt @@ -12,3 +12,4 @@ date: { } includeReason: true ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-full-expected.txt b/test/results/echo-full-expected.txt index 19a50d8..44bcd08 100644 --- a/test/results/echo-full-expected.txt +++ b/test/results/echo-full-expected.txt @@ -44,3 +44,4 @@ misc: { } float: 0.123 ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-full-json-expected.txt b/test/results/echo-full-json-expected.txt index 105a40a..7bd6cfb 100644 --- a/test/results/echo-full-json-expected.txt +++ b/test/results/echo-full-json-expected.txt @@ -4,3 +4,4 @@ =========================== 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} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-full-no-curl-expected.txt b/test/results/echo-full-no-curl-expected.txt index 19a50d8..44bcd08 100644 --- a/test/results/echo-full-no-curl-expected.txt +++ b/test/results/echo-full-no-curl-expected.txt @@ -44,3 +44,4 @@ misc: { } float: 0.123 ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-quiet-expected.txt b/test/results/echo-quiet-expected.txt index 76f2a05..c9f0376 100644 --- a/test/results/echo-quiet-expected.txt +++ b/test/results/echo-quiet-expected.txt @@ -9,3 +9,4 @@ int32: 123123123 int64: 123123123123123 float: 0.123 ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/echo-quiet-no-curl-expected.txt b/test/results/echo-quiet-no-curl-expected.txt index 76f2a05..c9f0376 100644 --- a/test/results/echo-quiet-no-curl-expected.txt +++ b/test/results/echo-quiet-no-curl-expected.txt @@ -9,3 +9,4 @@ int32: 123123123 int64: 123123123123123 float: 0.123 ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/empty-day-epoch-time-thursday-expected.txt b/test/results/empty-day-epoch-time-thursday-expected.txt index 13f1af8..b0a11bb 100644 --- a/test/results/empty-day-epoch-time-thursday-expected.txt +++ b/test/results/empty-day-epoch-time-thursday-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 13f1af8..b0a11bb 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 @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 13f1af8..b0a11bb 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 @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 13f1af8..b0a11bb 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 @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/failure-simple-expected.txt b/test/results/failure-simple-expected.txt index 7f44d19..e1c0108 100644 --- a/test/results/failure-simple-expected.txt +++ b/test/results/failure-simple-expected.txt @@ -3,3 +3,4 @@ ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found +######### EXIT 1 ######### diff --git a/test/results/failure-simple-no-curl-expected.txt b/test/results/failure-simple-no-curl-expected.txt index 7f44d19..e1c0108 100644 --- a/test/results/failure-simple-no-curl-expected.txt +++ b/test/results/failure-simple-no-curl-expected.txt @@ -3,3 +3,4 @@ ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found +######### EXIT 1 ######### diff --git a/test/results/failure-simple-quiet-expected.txt b/test/results/failure-simple-quiet-expected.txt index dd1b0f6..7a5fa3e 100644 --- a/test/results/failure-simple-quiet-expected.txt +++ b/test/results/failure-simple-quiet-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found +######### EXIT 1 ######### diff --git a/test/results/failure-simple-quiet-no-curl-expected.txt b/test/results/failure-simple-quiet-no-curl-expected.txt index dd1b0f6..7a5fa3e 100644 --- a/test/results/failure-simple-quiet-no-curl-expected.txt +++ b/test/results/failure-simple-quiet-no-curl-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Request was unsuccessful. Received response status code outside of 2XX. Got: HTTP/1.1 404 Not Found +######### EXIT 1 ######### diff --git a/test/results/far-future-expected.txt b/test/results/far-future-expected.txt index f2d5650..3440d53 100644 --- a/test/results/far-future-expected.txt +++ b/test/results/far-future-expected.txt @@ -8,3 +8,4 @@ includeReason: true =========================== Response Text =========================== <<< err: "Cannot handle number of millis 123231648044939152 as number: 123231648044939150\n" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/far-future-json--v-expected.txt b/test/results/far-future-json--v-expected.txt index 716b5c9..784a50c 100644 --- a/test/results/far-future-json--v-expected.txt +++ b/test/results/far-future-json--v-expected.txt @@ -255,7 +255,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:37:11 GMT +Date: Tue, 26 Apr 2022 22:34:54 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 63 @@ -269,3 +269,4 @@ Resolved message package-paths for name HappyDayResponse: [happyday.HappyDayResp =========================== Response JSON =========================== <<< {"isHappyDay":true,"reason":"Friday is a Happy Day! ⭐","formattedDate":"Fri, 31 Dec 9999 23:59:59 GMT"} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/far-future-json-expected.txt b/test/results/far-future-json-expected.txt index 557177e..749a937 100644 --- a/test/results/far-future-json-expected.txt +++ b/test/results/far-future-json-expected.txt @@ -4,3 +4,4 @@ =========================== Response JSON =========================== <<< {"isHappyDay":true,"reason":"Friday is a Happy Day! ⭐","formattedDate":"Fri, 31 Dec 9999 23:59:59 GMT"} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/far-future-no-curl-expected.txt b/test/results/far-future-no-curl-expected.txt index f2d5650..3440d53 100644 --- a/test/results/far-future-no-curl-expected.txt +++ b/test/results/far-future-no-curl-expected.txt @@ -8,3 +8,4 @@ includeReason: true =========================== Response Text =========================== <<< err: "Cannot handle number of millis 123231648044939152 as number: 123231648044939150\n" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/global-protoc-and-lib-expected.txt b/test/results/global-protoc-and-lib-expected.txt index 13f1af8..b0a11bb 100644 --- a/test/results/global-protoc-and-lib-expected.txt +++ b/test/results/global-protoc-and-lib-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/global-protoc-expected.txt b/test/results/global-protoc-expected.txt index 2376d88..077773c 100644 --- a/test/results/global-protoc-expected.txt +++ b/test/results/global-protoc-expected.txt @@ -8,3 +8,4 @@ happyday.proto:5:1: Import "google/protobuf/timestamp.proto" was not found or ha happyday.proto:8:3: "google.protobuf.Timestamp" is not defined. Underlying error: exit status 1 +######### EXIT 1 ######### diff --git a/test/results/help-expected.txt b/test/results/help-expected.txt index debab6d..92a4e99 100644 --- a/test/results/help-expected.txt +++ b/test/results/help-expected.txt @@ -41,3 +41,4 @@ Flags: -v, --verbose Prints version and enables verbose output. Also activates -D. --version version for protocurl ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/help-missing-curl-expected.txt b/test/results/help-missing-curl-expected.txt index debab6d..92a4e99 100644 --- a/test/results/help-missing-curl-expected.txt +++ b/test/results/help-missing-curl-expected.txt @@ -41,3 +41,4 @@ Flags: -v, --verbose Prints version and enables verbose output. Also activates -D. --version version for protocurl ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/help-missing-curl-no-curl-expected.txt b/test/results/help-missing-curl-no-curl-expected.txt index debab6d..92a4e99 100644 --- a/test/results/help-missing-curl-no-curl-expected.txt +++ b/test/results/help-missing-curl-no-curl-expected.txt @@ -41,3 +41,4 @@ Flags: -v, --verbose Prints version and enables verbose output. Also activates -D. --version version for protocurl ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/help-no-curl-expected.txt b/test/results/help-no-curl-expected.txt index debab6d..92a4e99 100644 --- a/test/results/help-no-curl-expected.txt +++ b/test/results/help-no-curl-expected.txt @@ -41,3 +41,4 @@ Flags: -v, --verbose Prints version and enables verbose output. Also activates -D. --version version for protocurl ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/in-wrong-expected.txt b/test/results/in-wrong-expected.txt index 9782e38..559ec6f 100644 --- a/test/results/in-wrong-expected.txt +++ b/test/results/in-wrong-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Unknown input format bad. Expected text or json for --in +######### EXIT 1 ######### diff --git a/test/results/infer-files-provide-file-wrong-args-expected.txt b/test/results/infer-files-provide-file-wrong-args-expected.txt index 234ddae..acb9365 100644 --- a/test/results/infer-files-provide-file-wrong-args-expected.txt +++ b/test/results/infer-files-provide-file-wrong-args-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Both -F is set and -f is provided. Please provide only one of these. +######### EXIT 1 ######### diff --git a/test/results/inferred-message-package-path-expected.txt b/test/results/inferred-message-package-path-expected.txt index da6814c..bd50b69 100644 --- a/test/results/inferred-message-package-path-expected.txt +++ b/test/results/inferred-message-package-path-expected.txt @@ -257,7 +257,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 00:07:04 GMT +Date: Tue, 26 Apr 2022 22:32:39 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 @@ -273,3 +273,4 @@ Resolved message package-paths for name HappyDayResponse: [happyday.HappyDayResp reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/inferred-message-package-path-name-clash-ambiguous-error-expected.txt b/test/results/inferred-message-package-path-name-clash-ambiguous-error-expected.txt index 1efacb8..8c7c4f7 100644 --- a/test/results/inferred-message-package-path-name-clash-ambiguous-error-expected.txt +++ b/test/results/inferred-message-package-path-name-clash-ambiguous-error-expected.txt @@ -2,3 +2,4 @@ ######### STDERR ######### Error: Message with base name is not unique. Found 2 messages with package paths: [happyday.HappyDayRequest otherPackage.HappyDayRequest] Try -v verbose or specify the file explicitly via -f . +######### EXIT 1 ######### 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 f92ce1d..a0d73c1 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 @@ -322,7 +322,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 00:14:42 GMT +Date: Tue, 26 Apr 2022 22:33:01 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 @@ -338,3 +338,4 @@ Resolved message package-paths for name HappyDayResponse: [happyday.HappyDayResp reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/inferred-message-package-path-nested-expected.txt b/test/results/inferred-message-package-path-nested-expected.txt index 13f1af8..b0a11bb 100644 --- a/test/results/inferred-message-package-path-nested-expected.txt +++ b/test/results/inferred-message-package-path-nested-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 13f1af8..b0a11bb 100644 --- a/test/results/inferred-message-package-path-nested-subdir-expected.txt +++ b/test/results/inferred-message-package-path-nested-subdir-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/inferred-proto-file--F-expected.txt b/test/results/inferred-proto-file--F-expected.txt index 8223ce2..f4489e1 100644 --- a/test/results/inferred-proto-file--F-expected.txt +++ b/test/results/inferred-proto-file--F-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/inferred-proto-file-expected.txt b/test/results/inferred-proto-file-expected.txt index 8223ce2..f4489e1 100644 --- a/test/results/inferred-proto-file-expected.txt +++ b/test/results/inferred-proto-file-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 8223ce2..f4489e1 100644 --- a/test/results/inferred-proto-file-message-package-path-expected.txt +++ b/test/results/inferred-proto-file-message-package-path-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/invalid-protofile-dir-expected.txt b/test/results/invalid-protofile-dir-expected.txt index 64a97e1..2eb60e5 100644 --- a/test/results/invalid-protofile-dir-expected.txt +++ b/test/results/invalid-protofile-dir-expected.txt @@ -6,3 +6,4 @@ does-not-exist: warning: directory does not exist. Could not make proto path relative: does-not-exist/happyday.proto: No such file or directory Underlying error: exit status 1 +######### EXIT 1 ######### diff --git a/test/results/invalid-protofile-path-expected.txt b/test/results/invalid-protofile-path-expected.txt index c06ef20..ec038ee 100644 --- a/test/results/invalid-protofile-path-expected.txt +++ b/test/results/invalid-protofile-path-expected.txt @@ -5,3 +5,4 @@ protoc stderr: Could not make proto path relative: /proto/does-not-exist.proto: No such file or directory Underlying error: exit status 1 +######### EXIT 1 ######### diff --git a/test/results/json-in-expected.txt b/test/results/json-in-expected.txt index b5f7e62..9c22402 100644 --- a/test/results/json-in-expected.txt +++ b/test/results/json-in-expected.txt @@ -4,3 +4,4 @@ =========================== Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/json-in-proper-proto-names-expected.txt b/test/results/json-in-proper-proto-names-expected.txt index dadb487..13af930 100644 --- a/test/results/json-in-proper-proto-names-expected.txt +++ b/test/results/json-in-proper-proto-names-expected.txt @@ -4,3 +4,4 @@ =========================== Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/json-in-text-output-expected.txt b/test/results/json-in-text-output-expected.txt index 08037b7..442fbad 100644 --- a/test/results/json-in-text-output-expected.txt +++ b/test/results/json-in-text-output-expected.txt @@ -255,7 +255,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:36:57 GMT +Date: Tue, 26 Apr 2022 22:33:35 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 @@ -271,3 +271,4 @@ Resolved message package-paths for name HappyDayResponse: [happyday.HappyDayResp reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/json-in-wrong-arg-expected.txt b/test/results/json-in-wrong-arg-expected.txt index 06bf581..5a95eac 100644 --- a/test/results/json-in-wrong-arg-expected.txt +++ b/test/results/json-in-wrong-arg-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Specified input format text is different from inferred format json. Please check your arguments. +######### EXIT 1 ######### diff --git a/test/results/json-out-pretty-expected.txt b/test/results/json-out-pretty-expected.txt index 2001301..4f8521e 100644 --- a/test/results/json-out-pretty-expected.txt +++ b/test/results/json-out-pretty-expected.txt @@ -7,3 +7,4 @@ "formattedDate": "Wed, 23 Mar 2022 14:15:39 GMT" } ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/message-package-path-nested-subdir-expected.txt b/test/results/message-package-path-nested-subdir-expected.txt index 13f1af8..b0a11bb 100644 --- a/test/results/message-package-path-nested-subdir-expected.txt +++ b/test/results/message-package-path-nested-subdir-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/message-package-path-resolved-to-non-message-error-expected.txt b/test/results/message-package-path-resolved-to-non-message-error-expected.txt index ed094f3..18345d3 100644 --- a/test/results/message-package-path-resolved-to-non-message-error-expected.txt +++ b/test/results/message-package-path-resolved-to-non-message-error-expected.txt @@ -6,3 +6,4 @@ Did you correctly specify the full message package-path to your Protobuf message Try again with -v (verbose). Underlying error: could not convert descriptor to protoreflect.MessageDescriptor: EnumDescriptor{Syntax: proto3, FullName: otherPackage.ThisIsAnEnum, Values: [{Name: A},{Name: B, Number: 1}]} +######### EXIT 1 ######### diff --git a/test/results/missing-args-expected.txt b/test/results/missing-args-expected.txt index 7be9684..f63f7e5 100644 --- a/test/results/missing-args-expected.txt +++ b/test/results/missing-args-expected.txt @@ -40,3 +40,4 @@ Flags: --version version for protocurl Error: required flag(s) "data-text","request-type","response-type","url" not set +######### EXIT 1 ######### diff --git a/test/results/missing-args-no-curl-expected.txt b/test/results/missing-args-no-curl-expected.txt index 7be9684..f63f7e5 100644 --- a/test/results/missing-args-no-curl-expected.txt +++ b/test/results/missing-args-no-curl-expected.txt @@ -40,3 +40,4 @@ Flags: --version version for protocurl Error: required flag(s) "data-text","request-type","response-type","url" not set +######### EXIT 1 ######### diff --git a/test/results/missing-args-partial-expected.txt b/test/results/missing-args-partial-expected.txt index 493473d..e806f38 100644 --- a/test/results/missing-args-partial-expected.txt +++ b/test/results/missing-args-partial-expected.txt @@ -40,3 +40,4 @@ Flags: --version version for protocurl Error: required flag(s) "data-text","response-type","url" not set +######### EXIT 1 ######### diff --git a/test/results/missing-args-partial-no-curl-expected.txt b/test/results/missing-args-partial-no-curl-expected.txt index 493473d..e806f38 100644 --- a/test/results/missing-args-partial-no-curl-expected.txt +++ b/test/results/missing-args-partial-no-curl-expected.txt @@ -40,3 +40,4 @@ Flags: --version version for protocurl Error: required flag(s) "data-text","response-type","url" not set +######### EXIT 1 ######### 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 76b44eb..053c9c2 100644 --- a/test/results/missing-curl-header-args-not-possible-expected.txt +++ b/test/results/missing-curl-header-args-not-possible-expected.txt @@ -7,3 +7,4 @@ date: { includeReason: true ######### STDERR ######### Error: Custom headers are not supported when using internal http. Please provide curl in path and avoid using --no-curl. Found headers: ["Content-Type: application/x-protobuf" "x-abc: def"] +######### EXIT 1 ######### diff --git a/test/results/missing-curl-no-curl-expected.txt b/test/results/missing-curl-no-curl-expected.txt index 8223ce2..f4489e1 100644 --- a/test/results/missing-curl-no-curl-expected.txt +++ b/test/results/missing-curl-no-curl-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/missing-protoc-expected.txt b/test/results/missing-protoc-expected.txt index cbc81c0..49b3d4b 100644 --- a/test/results/missing-protoc-expected.txt +++ b/test/results/missing-protoc-expected.txt @@ -30,3 +30,4 @@ Invoked with following default & parsed arguments: ######### STDERR ######### Error: Could not find bundled executable protoc Error: stat /protocurl/protocurl-internal/bin/protoc: no such file or directory +######### EXIT 1 ######### diff --git a/test/results/missing-protoc-global-expected.txt b/test/results/missing-protoc-global-expected.txt index 94d0d4b..a631cb6 100644 --- a/test/results/missing-protoc-global-expected.txt +++ b/test/results/missing-protoc-global-expected.txt @@ -31,3 +31,4 @@ GlobalProtoc is set, hence bundled protoc will be ignored. ######### STDERR ######### Error: I could not find a 'protoc' executable. Please check your PATH. Underlying error: exec: "protoc": executable file not found in $PATH +######### EXIT 1 ######### diff --git a/test/results/missing-protocurl-internal-expected.txt b/test/results/missing-protocurl-internal-expected.txt index 10a418b..856366b 100644 --- a/test/results/missing-protocurl-internal-expected.txt +++ b/test/results/missing-protocurl-internal-expected.txt @@ -34,3 +34,4 @@ I was expecting to find a directory 'protocurl-internal' side by side to the bin directory containing the protocurl executable. The executable was found at /protocurl/bin/protocurl Error: lstat /protocurl/protocurl-internal: no such file or directory +######### EXIT 1 ######### diff --git a/test/results/moved-curl-expected.txt b/test/results/moved-curl-expected.txt index 13f1af8..b0a11bb 100644 --- a/test/results/moved-curl-expected.txt +++ b/test/results/moved-curl-expected.txt @@ -6,3 +6,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 01 Jan 1970 00:00:00 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/moved-curl-no-curl-expected.txt b/test/results/moved-curl-no-curl-expected.txt index e626d0f..985f2dc 100644 --- a/test/results/moved-curl-no-curl-expected.txt +++ b/test/results/moved-curl-no-curl-expected.txt @@ -3,3 +3,4 @@ Error: Both --curl and --no-curl are active. I cannot use and not use curl. Please check the supplied and implied arguments via -v. +######### EXIT 1 ######### diff --git a/test/results/moved-lib-expected.txt b/test/results/moved-lib-expected.txt index c5d522b..4a7738e 100644 --- a/test/results/moved-lib-expected.txt +++ b/test/results/moved-lib-expected.txt @@ -40,3 +40,4 @@ happyday.proto:5:1: Import "google/protobuf/timestamp.proto" was not found or ha happyday.proto:8:3: "google.protobuf.Timestamp" is not defined. Underlying error: exit status 1 +######### EXIT 1 ######### diff --git a/test/results/no-reason-curl-expected.txt b/test/results/no-reason-curl-expected.txt index 9439fe2..8a3dad9 100644 --- a/test/results/no-reason-curl-expected.txt +++ b/test/results/no-reason-curl-expected.txt @@ -8,3 +8,4 @@ date: { isHappyDay: true formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/no-reason-expected.txt b/test/results/no-reason-expected.txt index 9439fe2..8a3dad9 100644 --- a/test/results/no-reason-expected.txt +++ b/test/results/no-reason-expected.txt @@ -8,3 +8,4 @@ date: { isHappyDay: true formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/other-days-are-happy-days-expected.txt b/test/results/other-days-are-happy-days-expected.txt index 2b2dba1..348d6c7 100644 --- a/test/results/other-days-are-happy-days-expected.txt +++ b/test/results/other-days-are-happy-days-expected.txt @@ -10,3 +10,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 2b2dba1..348d6c7 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 @@ -10,3 +10,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 2b2dba1..348d6c7 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 @@ -10,3 +10,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 2b2dba1..348d6c7 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 @@ -10,3 +10,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/out-wrong-expected.txt b/test/results/out-wrong-expected.txt index 5003e96..3a9568e 100644 --- a/test/results/out-wrong-expected.txt +++ b/test/results/out-wrong-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Unknown output format bad. Expected text, json or json:pretty for --out +######### EXIT 1 ######### diff --git a/test/results/quiet-with-content-expected.txt b/test/results/quiet-with-content-expected.txt index 48b658a..e6de3a9 100644 --- a/test/results/quiet-with-content-expected.txt +++ b/test/results/quiet-with-content-expected.txt @@ -3,3 +3,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/quiet-with-content-no-curl-expected.txt b/test/results/quiet-with-content-no-curl-expected.txt index 48b658a..e6de3a9 100644 --- a/test/results/quiet-with-content-no-curl-expected.txt +++ b/test/results/quiet-with-content-no-curl-expected.txt @@ -3,3 +3,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/text-in-expected.txt b/test/results/text-in-expected.txt index 8223ce2..f4489e1 100644 --- a/test/results/text-in-expected.txt +++ b/test/results/text-in-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/text-in-json-output-expected.txt b/test/results/text-in-json-output-expected.txt index 57076c2..70c0d41 100644 --- a/test/results/text-in-json-output-expected.txt +++ b/test/results/text-in-json-output-expected.txt @@ -259,7 +259,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:36:56 GMT +Date: Tue, 26 Apr 2022 22:33:33 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 68 @@ -274,3 +274,4 @@ Resolved message package-paths for name HappyDayResponse: [happyday.HappyDayResp =========================== Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/text-in-wrong-arg-expected.txt b/test/results/text-in-wrong-arg-expected.txt index 212b49b..806b940 100644 --- a/test/results/text-in-wrong-arg-expected.txt +++ b/test/results/text-in-wrong-arg-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: Specified input format json is different from inferred format text. Please check your arguments. +######### EXIT 1 ######### diff --git a/test/results/unknown-base-message-name-error-expected.txt b/test/results/unknown-base-message-name-error-expected.txt index d8772de..cf6cc76 100644 --- a/test/results/unknown-base-message-name-error-expected.txt +++ b/test/results/unknown-base-message-name-error-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### ######### STDERR ######### Error: No message found with base name: DoesNotExist. Check the folder of proto files (-I) and verbose (-v). +######### EXIT 1 ######### diff --git a/test/results/unknown-message-package-path-error-expected.txt b/test/results/unknown-message-package-path-error-expected.txt index ffa2cda..48ac56e 100644 --- a/test/results/unknown-message-package-path-error-expected.txt +++ b/test/results/unknown-message-package-path-error-expected.txt @@ -5,3 +5,4 @@ Did you correctly -I (include) your proto files directory? Did you correctly specify the full message package-path to your Protobuf message type? Try again with -v (verbose). Underlying error: proto: not found +######### EXIT 1 ######### diff --git a/test/results/verbose-custom-headers-expected.txt b/test/results/verbose-custom-headers-expected.txt index 2faf57b..0871b11 100644 --- a/test/results/verbose-custom-headers-expected.txt +++ b/test/results/verbose-custom-headers-expected.txt @@ -265,7 +265,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:37:03 GMT +Date: Tue, 26 Apr 2022 22:34:08 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -282,3 +282,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/verbose-custom-headers-no-curl-expected.txt b/test/results/verbose-custom-headers-no-curl-expected.txt index 24f3c41..e5b2a4f 100644 --- a/test/results/verbose-custom-headers-no-curl-expected.txt +++ b/test/results/verbose-custom-headers-no-curl-expected.txt @@ -3,3 +3,4 @@ Inferred input text type as text. Infering proto files (-F), since -f was not provided. ######### STDERR ######### Error: Custom headers are not supported when using internal http. Please provide curl in path and avoid using --no-curl. Found headers: ["x-abc: def" "x-ghi: jkl"] +######### EXIT 1 ######### diff --git a/test/results/verbose-expected.txt b/test/results/verbose-expected.txt index b19a7bf..7cfca0b 100644 --- a/test/results/verbose-expected.txt +++ b/test/results/verbose-expected.txt @@ -255,7 +255,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 00:07:20 GMT +Date: Tue, 26 Apr 2022 22:33:59 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -271,3 +271,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/verbose-long-args-equals-args-expected.txt b/test/results/verbose-long-args-equals-args-expected.txt index 468acd2..d87ba2e 100644 --- a/test/results/verbose-long-args-equals-args-expected.txt +++ b/test/results/verbose-long-args-equals-args-expected.txt @@ -255,7 +255,7 @@ Total curl args: =========================== Response Headers =========================== <<< HTTP/1.1 200 OK Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 00:07:21 GMT +Date: Tue, 26 Apr 2022 22:34:05 GMT Connection: keep-alive Keep-Alive: timeout=5 Content-Length: 65 @@ -271,3 +271,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/verbose-missing-curl-expected.txt b/test/results/verbose-missing-curl-expected.txt index 4d8b126..893a61d 100644 --- a/test/results/verbose-missing-curl-expected.txt +++ b/test/results/verbose-missing-curl-expected.txt @@ -247,7 +247,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 16:37:04 GMT +Date: Tue, 26 Apr 2022 22:34:13 GMT Keep-Alive: timeout=5 =========================== Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | @@ -262,3 +262,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/verbose-no-curl-expected.txt b/test/results/verbose-no-curl-expected.txt index 1e06b45..84b71fa 100644 --- a/test/results/verbose-no-curl-expected.txt +++ b/test/results/verbose-no-curl-expected.txt @@ -243,7 +243,7 @@ HTTP/1.1 200 OK Content-Length: 65 Connection: keep-alive Content-Type: application/x-protobuf -Date: Sat, 23 Apr 2022 00:07:20 GMT +Date: Tue, 26 Apr 2022 22:34:02 GMT Keep-Alive: timeout=5 =========================== Response Binary =========================== <<< 00000000 08 01 12 1c 54 68 75 72 73 64 61 79 20 69 73 20 |....Thursday is | @@ -257,3 +257,4 @@ isHappyDay: true reason: "Thursday is a Happy Day! ⭐" formattedDate: "Thu, 13 Jan 2022 03:35:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/version-expected.txt b/test/results/version-expected.txt index 9eb5a28..11bd90e 100644 --- a/test/results/version-expected.txt +++ b/test/results/version-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### protocurl version , build , https://github.com/qaware/protocurl ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/results/version-no-curl-expected.txt b/test/results/version-no-curl-expected.txt index 9eb5a28..11bd90e 100644 --- a/test/results/version-no-curl-expected.txt +++ b/test/results/version-no-curl-expected.txt @@ -1,3 +1,4 @@ ######### STDOUT ######### protocurl version , build , https://github.com/qaware/protocurl ######### STDERR ######### +######### EXIT 0 ######### 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 8223ce2..f4489e1 100644 --- a/test/results/wednesday-is-not-a-happy-day-expected.txt +++ b/test/results/wednesday-is-not-a-happy-day-expected.txt @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### 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 b5f7e62..9c22402 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 @@ -4,3 +4,4 @@ =========================== Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} ######### STDERR ######### +######### EXIT 0 ######### 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 b5f7e62..9c22402 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 @@ -4,3 +4,4 @@ =========================== Response JSON =========================== <<< {"reason":"Tough luck on Wednesday... 😕","formattedDate":"Wed, 23 Mar 2022 14:15:39 GMT"} ######### STDERR ######### +######### EXIT 0 ######### 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 8223ce2..f4489e1 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 @@ -9,3 +9,4 @@ includeReason: true reason: "Tough luck on Wednesday... 😕" formattedDate: "Wed, 23 Mar 2022 14:15:39 GMT" ######### STDERR ######### +######### EXIT 0 ######### diff --git a/test/suite/test.sh b/test/suite/test.sh index f4d09bf..7d6201c 100755 --- a/test/suite/test.sh +++ b/test/suite/test.sh @@ -40,18 +40,23 @@ testSingleRequest() { rm -f "$OUT" || true rm -f "$OUT_ERR" || true echo "######### STDOUT #########" >"$OUT" + EXIT_CODE="?" set +e if [[ "$BEFORE_TEST_BASH" == "" ]]; then eval "$RUN_CLIENT --name $FILENAME $PROTOCURL_IMAGE $ARGS" 2>"$OUT_ERR" >>"$OUT" + EXIT_CODE="$?" else ARGS="$(echo "$ARGS" | sed 's/"/\\"/g')" # escape before usage inside quoted context eval "$RUN_CLIENT --entrypoint bash --name $FILENAME $PROTOCURL_IMAGE -c \"$BEFORE_TEST_BASH && ./bin/protocurl $ARGS\"" 2>"$OUT_ERR" >>"$OUT" + EXIT_CODE="$?" fi echo "######### STDERR #########" >>"$OUT" cat "$OUT_ERR" >>"$OUT" + echo "######### EXIT $EXIT_CODE #########" >>"$OUT" + meaningfulDiff "$EXPECTED" "$OUT" >/dev/null if [[ "$?" != 0 ]]; then From c9fd2d53903299c75d73ae55f6c5a68e31342df6 Mon Sep 17 00:00:00 2001 From: qa-swaneet-sahoo Date: Wed, 27 Apr 2022 01:19:05 +0200 Subject: [PATCH 4/5] Linux package installation in README. --- README.md | 25 +++++++++++++++++++++---- TESTS.md | 11 +++++++++-- doc/template.README.md | 25 +++++++++++++++++++++---- 3 files changed, 51 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 5d4da65..830b41e 100644 --- a/README.md +++ b/README.md @@ -22,17 +22,34 @@ human-readable text formats. `protocurl` includes and uses a bundled `protoc` by default. It is recommended to install `curl` into PATH for configurable http requests. Otherwise `protocurl` will use a simple non-configurable fallback http implementation. -#### Native CLI +### Native CLI + +**Archive** 1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases 2. Extract the archive into a folder, e.g. `/opt/protocurl`. 3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl` Or add the binary folder `/opt/protocurl/bin` to your system-wide path. -4. Test that it works via `protocurl -h` +4. Test it via `protocurl -h` + +**Debian .deb package** + +1. Download the latest release `.deb` for your architecture from https://github.com/qaware/protocurl/releases +2. Install dependency curl: `sudo apt install curl` +3. Install `sudo dpkg -i .deb` +4. Test it via `protocurl -h` + +**Alpine .apt package** + +1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases +2. Install dependencies curl and gcompat: `sudo apk add curl gcompat` +3. Install `sudo apk add --alow-untrusted .apk` +4. Test it via `protocurl -h` -#### Docker +### Docker -Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl `. See [Quick Start](#quick-start) for how to use. +Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl `. See [Quick Start](#quick-start) for +how to use. ## Quick Start diff --git a/TESTS.md b/TESTS.md index c44a95c..ed45b6d 100644 --- a/TESTS.md +++ b/TESTS.md @@ -1,9 +1,14 @@ # Tests -There are two tests. The docker-containerized tests and multi-platform native tests (running on windows, macos, etc.). +There are three types of tests. The docker-containerized tests, multi-platform native archive tests (running on windows, +macos, etc.) +and multi-platform native package tests. + The containerized tests do much of the heavy lifting in ensuring correctness - whereas the native tests ensure that the basic functionality work multi-platform and contains regression tests for OS-specific behavior. +The native tests extract the release archive and the release packages (e.g. .deb, .apk) and run basic tests. + ## Containerized Tests The tests are run automatically via GitHub Actions [here](.github/workflows/test.yml). Run them @@ -90,7 +95,9 @@ jobs are named `post-release-test-`. After setting up the machine, they star via [test/servers/native-start-server.ps1](test/servers/native-start-server.ps1) and run the tests. The output is not tested rigorously like the containerized tests. Only the successful exit is tested implicitly as the -Powershell is set to stop on the first error via `$ErrorActionPreference = "Stop"`. +Powershell is set to stop on the first error via `$ErrorActionPreference = "Stop"` and `$LASTEXITCODE`. + +On linux the release packages are tested inside a container. ## Example Containerized Tests diff --git a/doc/template.README.md b/doc/template.README.md index 35f2a0d..e3c1061 100644 --- a/doc/template.README.md +++ b/doc/template.README.md @@ -22,17 +22,34 @@ human-readable text formats. `protocurl` includes and uses a bundled `protoc` by default. It is recommended to install `curl` into PATH for configurable http requests. Otherwise `protocurl` will use a simple non-configurable fallback http implementation. -#### Native CLI +### Native CLI + +**Archive** 1. Download the latest release archive for your platform from https://github.com/qaware/protocurl/releases 2. Extract the archive into a folder, e.g. `/opt/protocurl`. 3. Add symlink to the binary in the folder. e.g. `ln -s /opt/protocurl/bin/protocurl /usr/bin/protocurl` Or add the binary folder `/opt/protocurl/bin` to your system-wide path. -4. Test that it works via `protocurl -h` +4. Test it via `protocurl -h` + +**Debian .deb package** + +1. Download the latest release `.deb` for your architecture from https://github.com/qaware/protocurl/releases +2. Install dependency curl: `sudo apt install curl` +3. Install `sudo dpkg -i .deb` +4. Test it via `protocurl -h` + +**Alpine .apt package** + +1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases +2. Install dependencies curl and gcompat: `sudo apk add curl gcompat` +3. Install `sudo apk add --alow-untrusted .apk` +4. Test it via `protocurl -h` -#### Docker +### Docker -Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl `. See [Quick Start](#quick-start) for how to use. +Simply run `docker run -v "/path/to/proto/files:/proto" qaware/protocurl `. See [Quick Start](#quick-start) for +how to use. ## Quick Start From 075bb7abdcf3a19536617a9e42db3d9dc199b37f Mon Sep 17 00:00:00 2001 From: qa-swaneet-sahoo Date: Wed, 27 Apr 2022 01:46:18 +0200 Subject: [PATCH 5/5] Fix typo. --- README.md | 2 +- doc/template.README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 830b41e..a0de055 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,7 @@ configurable http requests. Otherwise `protocurl` will use a simple non-configur 1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases 2. Install dependencies curl and gcompat: `sudo apk add curl gcompat` -3. Install `sudo apk add --alow-untrusted .apk` +3. Install `sudo apk add --allow-untrusted .apk` 4. Test it via `protocurl -h` ### Docker diff --git a/doc/template.README.md b/doc/template.README.md index e3c1061..18c71cd 100644 --- a/doc/template.README.md +++ b/doc/template.README.md @@ -43,7 +43,7 @@ configurable http requests. Otherwise `protocurl` will use a simple non-configur 1. Download the latest release `.apk` for your architecture from https://github.com/qaware/protocurl/releases 2. Install dependencies curl and gcompat: `sudo apk add curl gcompat` -3. Install `sudo apk add --alow-untrusted .apk` +3. Install `sudo apk add --allow-untrusted .apk` 4. Test it via `protocurl -h` ### Docker