From b245ab055b92eabb5c49744f60920a2b153c0c1f Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 17 Jan 2024 15:12:33 -0800 Subject: [PATCH 1/4] fix: set -i and -o pipefail in e2e tests --- .github/workflows/e2e.yml | 1 + e2e/utils/_.bash | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 94b4d4c803..0e382bbb6e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,6 +3,7 @@ on: push: branches: - master + - ens/pipefail pull_request: concurrency: diff --git a/e2e/utils/_.bash b/e2e/utils/_.bash index 391305a7ce..b778826099 100644 --- a/e2e/utils/_.bash +++ b/e2e/utils/_.bash @@ -1,4 +1,4 @@ -set -e +set -euo pipefail load ../utils/bats-support/load load ../utils/assertions load ../utils/webserver From a8aa5fa5cac1f4ee281dde081f6c9fb2a9abca0e Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 17 Jan 2024 15:45:53 -0800 Subject: [PATCH 2/4] remove -u --- e2e/utils/_.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/utils/_.bash b/e2e/utils/_.bash index b778826099..3b340a73ed 100644 --- a/e2e/utils/_.bash +++ b/e2e/utils/_.bash @@ -1,4 +1,4 @@ -set -euo pipefail +set -eo pipefail load ../utils/bats-support/load load ../utils/assertions load ../utils/webserver From b634c8ec16c19d33ae528907d160b4c9d4e9983e Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 17 Jan 2024 16:02:48 -0800 Subject: [PATCH 3/4] jq fails if input file does not exist --- e2e/tests-dfx/schema.bash | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/e2e/tests-dfx/schema.bash b/e2e/tests-dfx/schema.bash index 3886840934..8cdad36b6c 100644 --- a/e2e/tests-dfx/schema.bash +++ b/e2e/tests-dfx/schema.bash @@ -19,6 +19,6 @@ teardown() { } @test "dfx schema still works with broken dfx.json" { - jq '.broken_key="blahblahblah"' dfx.json | sponge dfx.json + echo '{}' | jq '.broken_key="blahblahblah"' > dfx.json assert_command dfx schema } From 11619e3e715c10665c90d5f1b145950e30de3bc9 Mon Sep 17 00:00:00 2001 From: Eric Swanson Date: Wed, 17 Jan 2024 16:03:27 -0800 Subject: [PATCH 4/4] revert branch exec --- .github/workflows/e2e.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index 0e382bbb6e..94b4d4c803 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -3,7 +3,6 @@ on: push: branches: - master - - ens/pipefail pull_request: concurrency: