Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NO-ISSUE: Update Dockerfile to use
go.uber.org/mock
(#911)
The change to use `go.uber.org/mock` instead of the deprecated `github.com/golang/mock` was was mostly done in the past. But the _Dockerfile_ wasn't updated to use the new `mockgen` command. As a result if one installs the `mockgen` with the command from the dockerfile and then runs `make generate` the resulting code doesn't build: ``` $ grep mockgen Dockerfile.assisted-installer-build go install github.com/golang/mock/[email protected] && \ $ go install github.com/golang/mock/[email protected] $ make generate go generate .. make format make[1]: Entering directory '/files/projects/assisted-installer/repository' make[1]: Leaving directory '/files/projects/assisted-installer/repository' $ make build CGO_ENABLED=0 go build -o build/installer src/main/main.go src/main/drymock/dry_mode_k8s_mock.go:308:36: cannot use mockController (variable of type *"go.uber.org/mock/gomock".Controller) as *"github.com/golang/mock/gomock".Controller value in argument to k8s_client.NewMockK8SClient make: *** [Makefile:68: installer] Error 1 ``` To avoid this issue this patch updates the _Dockerfile_ to use the `go.uber.org/mock` package. There are also some minor white space changes introduced by running `go generate`. Signed-off-by: Juan Hernandez <[email protected]>
- Loading branch information