From 97df972c78f6b8cf1cb56c39db0e9d1b4530ccd9 Mon Sep 17 00:00:00 2001 From: Bryce Palmer Date: Mon, 31 Jul 2023 14:12:41 -0400 Subject: [PATCH] update test-e2e-ansible binary path Signed-off-by: Bryce Palmer --- Makefile | 4 +--- internal/testutils/utils.go | 2 +- test/e2e/ansible/suite_test.go | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 0f4e122..c49004b 100644 --- a/Makefile +++ b/Makefile @@ -47,7 +47,7 @@ fix: ## Fixup files in the repo. go mod tidy go fmt ./... make setup-lint - $(TOOLS_DIR)/golangci-lint run --fix + $(TOOLS_DIR)/golangci-lint run --fix --timeout=2m .PHONY: setup-lint setup-lint: ## Setup the lint @@ -179,7 +179,6 @@ $(LOCALBIN): .PHONY: operator-sdk OPERATOR_SDK ?= $(LOCALBIN)/operator-sdk operator-sdk: ## Download operator-sdk locally if necessary. -ifeq (,$(wildcard $(OPERATOR_SDK))) @{ \ set -e ;\ mkdir -p $(dir $(OPERATOR_SDK)) ;\ @@ -187,7 +186,6 @@ ifeq (,$(wildcard $(OPERATOR_SDK))) curl -sSLo $(OPERATOR_SDK) https://github.com/operator-framework/operator-sdk/releases/download/$(OPERATOR_SDK_VERSION)/operator-sdk_$${OS}_$${ARCH} ;\ chmod +x $(OPERATOR_SDK) ;\ } -endif .DEFAULT_GOAL := help .PHONY: help diff --git a/internal/testutils/utils.go b/internal/testutils/utils.go index 676e6f6..c674655 100644 --- a/internal/testutils/utils.go +++ b/internal/testutils/utils.go @@ -29,7 +29,7 @@ import ( kbtestutils "sigs.k8s.io/kubebuilder/v3/test/e2e/utils" ) -const BinaryName = "./bin/operator-sdk" +const BinaryName = "bin/operator-sdk" // TestContext wraps kubebuilder's e2e TestContext. type TestContext struct { diff --git a/test/e2e/ansible/suite_test.go b/test/e2e/ansible/suite_test.go index 25c6a2c..8cb5d11 100644 --- a/test/e2e/ansible/suite_test.go +++ b/test/e2e/ansible/suite_test.go @@ -17,6 +17,7 @@ package e2e_ansible_test import ( "fmt" "os/exec" + "path" "path/filepath" "strings" "testing" @@ -46,9 +47,11 @@ var _ = BeforeSuite(func() { var err error By("creating a new test context") - tc, err = testutils.NewTestContext(testutils.BinaryName, "GO111MODULE=on") + tc, err = testutils.NewTestContext(path.Join("../../../../", testutils.BinaryName), "GO111MODULE=on") Expect(err).NotTo(HaveOccurred()) + fmt.Println(tc.Dir) + tc.Domain = "example.com" tc.Version = "v1alpha1" tc.Group = "cache"