-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(GCS): Migrate to using mockery/testify (#25)
* Adds `mockery` generated mocks for `cloudcost-exporter` specific interfaces * Removes using mocked interfaces for `pkg/gcp/bucket.go` and favors intercepting HTTP requests * Updates uncaught errors for the List commands in `pkg/gcp/bucket.go`
- Loading branch information
Showing
9 changed files
with
448 additions
and
29 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,11 @@ | ||
with-expecter: True | ||
inpackage: True | ||
dir: mocks/{{ replaceAll .InterfaceDirRelative "internal" "internal_" }} | ||
mockname: "{{.InterfaceName}}" | ||
outpkg: "{{.PackageName}}" | ||
filename: "{{.InterfaceName}}.go" | ||
all: True | ||
packages: | ||
github.com/grafana/cloudcost-exporter: | ||
config: | ||
recursive: True |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
package cloudcost_exporter | ||
|
||
// This is required for mockery to work: https://vektra.github.io/mockery/v2.38/notes/#error-no-go-files-found-in-root-search-path |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.