Skip to content

Commit

Permalink
refactor: (#1) Mark tests explicitly as E2E
Browse files Browse the repository at this point in the history
  • Loading branch information
keskad committed Nov 25, 2023
1 parent a5874c6 commit 86e6e4d
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
5 changes: 3 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
SUDO=
ENV_CLUSTER_NAME=pft
BIN_NAME=pipelines-feedback-tekton

.PHONY: all
all: build
Expand All @@ -10,10 +11,10 @@ PATH = $(LOCALBIN):$(shell echo $$PATH)
.PHONY: build
build: fmt vet ## Build manager binary.
@mkdir -p $(LOCALBIN)
go build -o $(LOCALBIN)/pipelines-feedback-tekton main.go
go build -o $(LOCALBIN)/${BIN_NAME} main.go

run:
./.build/pipelines-feedback-tekton --debug
./.build/p${BIN_NAME} --debug

.PHONY: fmt
fmt: ## Run go fmt against code.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/core/provider_test.go → pkgs/core/e2e_provider_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
)

func TestFetchLogs(t *testing.T) {
testpkg.Kubectl([]string{"delete", "-f", "../../test_data/test-run.yaml"})
testpkg.Kubectl([]string{"apply", "-f", "../../test_data/test-run.yaml"})
assert.Nil(t, testpkg.Kubectl([]string{"delete", "-f", "../../test_data/test-run.yaml"}))
assert.Nil(t, testpkg.Kubectl([]string{"apply", "-f", "../../test_data/test-run.yaml"}))
testpkg.WaitForPipelineFinishedByName("default", "test-run")

run := v1.PipelineRun{}
Expand Down
2 changes: 1 addition & 1 deletion pkgs/testpkg/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

func Kubectl(argv []string) error {
proc := exec.Command("kubectl", argv...)

_ = proc.Start()
waitErr := proc.Wait()
out, _ := proc.CombinedOutput()
logrus.Println(string(out))
Expand Down

0 comments on commit 86e6e4d

Please sign in to comment.