Skip to content

Commit

Permalink
update test-e2e-ansible binary path
Browse files Browse the repository at this point in the history
Signed-off-by: Bryce Palmer <bpalmer@redhat.com>
  • Loading branch information
everettraven committed Jul 31, 2023
1 parent 1885929 commit 97df972
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
4 changes: 1 addition & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -179,15 +179,13 @@ $(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)) ;\
OS=$(shell go env GOOS) && ARCH=$(shell go env GOARCH) && \
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
Expand Down
2 changes: 1 addition & 1 deletion internal/testutils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
5 changes: 4 additions & 1 deletion test/e2e/ansible/suite_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package e2e_ansible_test
import (
"fmt"
"os/exec"
"path"
"path/filepath"
"strings"
"testing"
Expand Down Expand Up @@ -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"
Expand Down

0 comments on commit 97df972

Please sign in to comment.