-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: refactor vgmanager into different interfaces and introduce tests
- Loading branch information
1 parent
d147fcb
commit 1221854
Showing
39 changed files
with
6,653 additions
and
436 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
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
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
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
Oops, something went wrong.