-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: replace root node test with mocked lvm/lsblk
- Loading branch information
1 parent
ef14733
commit 84dec74
Showing
27 changed files
with
5,999 additions
and
95 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
with-expecter: true | ||
filename: "{{.InterfaceName}}_mock.go" | ||
dir: "{{.InterfaceDir}}" | ||
mockname: "Mock{{.InterfaceName}}" | ||
outpkg: "{{.PackageName}}" | ||
inpackage: True | ||
packages: | ||
github.com/openshift/lvm-operator/pkg/lsblk: | ||
interfaces: | ||
LSBLK: | ||
github.com/openshift/lvm-operator/pkg/lvm: | ||
interfaces: | ||
LVM: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,6 +141,7 @@ manifests: controller-gen ## Generate WebhookConfiguration, ClusterRole and Cust | |
|
||
generate: controller-gen ## Generate code containing DeepCopy, DeepCopyInto, and DeepCopyObject method implementations. | ||
$(CONTROLLER_GEN) object:headerFile="hack/boilerplate.go.txt" paths="./..." | ||
$(shell $(MOCKERY)) | ||
|
||
fmt: ## Run go fmt against code. | ||
go fmt ./... | ||
|
@@ -319,6 +320,10 @@ GINKGO = $(shell pwd)/bin/ginkgo | |
ginkgo: ## Download ginkgo and gomega locally if necessary. | ||
$(call go-get-tool,$(GINKGO),github.com/onsi/ginkgo/v2/[email protected]) | ||
|
||
MOCKERY = $(shell pwd)/bin/mockery | ||
mockery: ## Download mockery and add locally if necessary | ||
$(call go-get-tool,$(MOCKERY),github.com/vektra/mockery/[email protected]) | ||
|
||
# go-get-tool will 'go get' any package $2 and install it to $1. | ||
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST)))) | ||
define go-get-tool | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.