forked from G-Research/fasttrackml
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve our mock setup (G-Research#389)
* Use a config file for mockery * Add `install-tools` Makefile target * Dev container: install Go tools in /usr/local/bin * Upgrade Go tools - mockery from 2.32.4 to 2.34.0 - golangci-lint from 1.54.1 to 1.54.2 - goimports from 0.11.0 to 0.13.0 * Add generated mocks * Check mocks have been committed in CI * Do not run goimports on mocks * Simply formatting check logic in CI * Remove mocks generation from Go unit tests job in CI
- Loading branch information
1 parent
dd9d0af
commit c6695c8
Showing
13 changed files
with
898 additions
and
36 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
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 |
---|---|---|
|
@@ -19,9 +19,6 @@ tests/integration/python/*/*.src | |
outputs | ||
poetry.lock | ||
|
||
# Mocks | ||
mock_* | ||
|
||
# Misc | ||
.DS_Store | ||
|
||
|
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,17 @@ | ||
dir: "{{ .InterfaceDir }}" | ||
filename: "mock_{{ .InterfaceNameSnake }}.go" | ||
with-expecter: false | ||
inpackage: true | ||
packages: | ||
github.com/G-Research/fasttrackml/pkg/api/mlflow/dao/repositories: | ||
interfaces: | ||
BaseRepositoryProvider: | ||
ExperimentRepositoryProvider: | ||
MetricRepositoryProvider: | ||
ParamRepositoryProvider: | ||
RunRepositoryProvider: | ||
TagRepositoryProvider: | ||
github.com/G-Research/fasttrackml/pkg/api/mlflow/service/artifact/storage: | ||
interfaces: | ||
ArtifactStorageFactoryProvider: | ||
ArtifactStorageProvider: |
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
43 changes: 43 additions & 0 deletions
43
pkg/api/mlflow/dao/repositories/mock_base_repository_provider.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
137 changes: 137 additions & 0 deletions
137
pkg/api/mlflow/dao/repositories/mock_experiment_repository_provider.go
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.