From 30d895fb59977f7db11d9ae29f20ab5e3c84e5ce Mon Sep 17 00:00:00 2001 From: JasonPowr Date: Mon, 25 Nov 2024 10:02:30 +0000 Subject: [PATCH] add testing resources --- .tekton/docker-build-oci-ta-pull-request.yaml | 2 +- .tekton/docker-build-pull-request.yaml | 2 +- pipeline-tests/main.go | 7 +++++++ pipeline-tests/main_test.go | 7 +++++++ 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 pipeline-tests/main.go create mode 100644 pipeline-tests/main_test.go diff --git a/.tekton/docker-build-oci-ta-pull-request.yaml b/.tekton/docker-build-oci-ta-pull-request.yaml index b628e85..8047501 100644 --- a/.tekton/docker-build-oci-ta-pull-request.yaml +++ b/.tekton/docker-build-oci-ta-pull-request.yaml @@ -37,7 +37,7 @@ spec: - name: go_unit_test value: true - name: go_test_command - value: cd pipeline-tests && go test ./... + value: go test ./pipeline-tests/... pipelineRef: resolver: git params: diff --git a/.tekton/docker-build-pull-request.yaml b/.tekton/docker-build-pull-request.yaml index 73df8fd..ecb9fa0 100644 --- a/.tekton/docker-build-pull-request.yaml +++ b/.tekton/docker-build-pull-request.yaml @@ -37,7 +37,7 @@ spec: - name: go_unit_test value: true - name: go_test_command - value: cd pipeline-tests && go test ./... + value: go test ../pipeline-tests/... pipelineRef: resolver: git params: diff --git a/pipeline-tests/main.go b/pipeline-tests/main.go new file mode 100644 index 0000000..b1b14d0 --- /dev/null +++ b/pipeline-tests/main.go @@ -0,0 +1,7 @@ +package main + +import "fmt" + +func main() { + fmt.Println("Hello World!") +} diff --git a/pipeline-tests/main_test.go b/pipeline-tests/main_test.go new file mode 100644 index 0000000..80d29cf --- /dev/null +++ b/pipeline-tests/main_test.go @@ -0,0 +1,7 @@ +package main + +import "testing" + +func Test(t *testing.T) { + // This will always pass +}