From ab40a036c5fb0a6e0e4ca2ffa5db2728f4b08c6c Mon Sep 17 00:00:00 2001 From: David Cheung Date: Mon, 9 Nov 2020 16:36:56 -0500 Subject: [PATCH 1/2] enable tests on main branch branch renamed and github actions had the wrong branch name --- .github/workflows/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/config.yml b/.github/workflows/config.yml index a01676cce..b0d930cc2 100644 --- a/.github/workflows/config.yml +++ b/.github/workflows/config.yml @@ -1,7 +1,7 @@ on: pull_request: branches: - - master + - main jobs: unit_test: From 0abe21a02d1052e23da326afe5cd495362651789 Mon Sep 17 00:00:00 2001 From: David Cheung Date: Mon, 9 Nov 2020 16:48:03 -0500 Subject: [PATCH 2/2] tests fails on mac due to binary filepaths --- internal/condition/condition_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/condition/condition_test.go b/internal/condition/condition_test.go index b3e313de9..a19dde003 100644 --- a/internal/condition/condition_test.go +++ b/internal/condition/condition_test.go @@ -1,6 +1,7 @@ package condition_test import ( + "encoding/base64" "math/rand" "os" "testing" @@ -12,7 +13,7 @@ import ( func testSetup(paramKey, paramValue string) (string, projectconfig.Module) { bytes := make([]byte, 15) _, _ = rand.Read(bytes) - name := string(bytes[:]) + name := string(base64.StdEncoding.EncodeToString(bytes[:])) _, _ = os.Create(name)