From 56034bdce88fa7fd88bd1f5cbdcf84cf2a467d56 Mon Sep 17 00:00:00 2001 From: Laurent Senta Date: Fri, 30 Jun 2023 16:17:52 +0200 Subject: [PATCH 1/2] fix: testing template --- tooling/tmpl/tmpl_test.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tooling/tmpl/tmpl_test.go b/tooling/tmpl/tmpl_test.go index 5b12959e9..73034e67e 100644 --- a/tooling/tmpl/tmpl_test.go +++ b/tooling/tmpl/tmpl_test.go @@ -143,7 +143,7 @@ func TestTemplatingWithEscaping(t *testing.T) { assert.Equal(t, "foo/{first}/{{}}/{{another}}/bar/{{{escaped}}}/{{first}}/baz", Fmt( - "{{first}}/{first}/{{{}}}/{{{another}}}/{{}}/{{{{escaped}}}}/{{{first}}}/{{two}}", + "{{first}}/{first}/{{{}}}/{{{another}}}/{{two}}/{{{{escaped}}}}/{{{first}}}/{{three}}", "foo", "bar", "baz", @@ -169,7 +169,7 @@ func TestTemplatingWithEscaping(t *testing.T) { assert.Equal(t, "{{foo", Fmt( - "{{{{}}", + "{{{{tmpl}}", "foo", ), ) @@ -177,7 +177,7 @@ func TestTemplatingWithEscaping(t *testing.T) { assert.Equal(t, "{name}}/{{foo/{barname}}}/{{{name}}}", Fmt( - "{name}}/{{{{name}}/{{{}}name}}}/{{{{name}}}}", + "{name}}/{{{{name}}/{{{two}}name}}}/{{{{name}}}}", "foo", "bar", ), From 1c7843c7e6a45e8476a9fda34d292e98282731a6 Mon Sep 17 00:00:00 2001 From: Laurent Senta Date: Fri, 30 Jun 2023 16:22:50 +0200 Subject: [PATCH 2/2] refactor: testing + add go test --- .../workflows/{test.yml => test-kubo-e2e.yml} | 2 +- .github/workflows/test-tooling.yml | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletion(-) rename .github/workflows/{test.yml => test-kubo-e2e.yml} (99%) create mode 100644 .github/workflows/test-tooling.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test-kubo-e2e.yml similarity index 99% rename from .github/workflows/test.yml rename to .github/workflows/test-kubo-e2e.yml index cb169ef6e..1b1acded3 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test-kubo-e2e.yml @@ -1,4 +1,4 @@ -name: Test +name: Test Kubo (e2e) on: workflow_dispatch: diff --git a/.github/workflows/test-tooling.yml b/.github/workflows/test-tooling.yml new file mode 100644 index 000000000..72565e9bf --- /dev/null +++ b/.github/workflows/test-tooling.yml @@ -0,0 +1,31 @@ +name: Test Tooling + +on: + workflow_dispatch: + push: + branches: + - main + pull_request: + +jobs: + test: + runs-on: 'ubuntu-latest' + strategy: + fail-fast: false + defaults: + run: + shell: bash + steps: + - name: Setup Go + uses: actions/setup-go@v3 + with: + go-version: 1.20.4 + - uses: actions/checkout@v3 + with: + path: 'gateway-conformance' + - uses: protocol/cache-go-action@v1 + - name: Run the tests + shell: bash + working-directory: ./gateway-conformance + run: | + go test ./tooling/... \ No newline at end of file