fix(tests): update gomock import paths to go.uber.org/mock
- Update shell_test.go, chroot_test.go, script_test.go to use go.uber.org/mock - Update mockgen directive in ports.go to use go.uber.org/mock/mockgen@latest - All 21+ executor tests pass - Build verification: ✅ go build ./cmd/archup-installer succeeds Resolves gomock import mismatch that was blocking Phase 7 completion
- commit
- e26872f19005f20d731fea2f54dc790767dcf0fd
- author
- bnema · · 2025-10-31 16:27 UTC
- parent
- 8105bed
- signature
- GPG Unverified
2B82207D370127A0The key is unknown
7 files · +4 -30
A archup-installer +0 -0 binary file: no text diff
binary file: no text diff
M go.mod +0 -1
| @@ -7,7 +7,6 @@ require ( | |||
| 7 | 7 | github.com/charmbracelet/bubbletea v1.3.10 | |
| 8 | 8 | github.com/charmbracelet/huh v0.8.0 | |
| 9 | 9 | github.com/charmbracelet/lipgloss v1.1.0 | |
| 10 | - | github.com/golang/mock v1.6.0 | |
| 11 | 10 | github.com/google/uuid v1.6.0 | |
| 12 | 11 | go.uber.org/mock v0.6.0 | |
| 13 | 12 | ) | |
| @@ -7,7 +7,6 @@ require ( | |||||
| 7 | github.com/charmbracelet/bubbletea v1.3.10 | 7 | github.com/charmbracelet/bubbletea v1.3.10 | ||
| 8 | github.com/charmbracelet/huh v0.8.0 | 8 | github.com/charmbracelet/huh v0.8.0 | ||
| 9 | github.com/charmbracelet/lipgloss v1.1.0 | 9 | github.com/charmbracelet/lipgloss v1.1.0 | ||
| 10 | - | github.com/golang/mock v1.6.0 | |||
| 11 | github.com/google/uuid v1.6.0 | 10 | github.com/google/uuid v1.6.0 | ||
| 12 | go.uber.org/mock v0.6.0 | 11 | go.uber.org/mock v0.6.0 | ||
| 13 | ) | 12 | ) | ||
M go.sum +0 -25 generated file: collapsed
M internal/domain/ports/ports.go +1 -1
| @@ -1,4 +1,4 @@ | |||
| 1 | - | //go:generate mockgen -destination=mocks/mock_ports.go -package=mocks . FileSystem,File,CommandExecutor,ChrootExecutor,ScriptExecutor,HTTPClient,Response,Logger,InstallationRepository | |
| 1 | + | //go:generate go run go.uber.org/mock/mockgen@latest -destination=mocks/mock_ports.go -package=mocks . FileSystem,File,CommandExecutor,ChrootExecutor,ScriptExecutor,HTTPClient,Response,Logger,InstallationRepository | |
| 2 | 2 | ||
| 3 | 3 | package ports | |
| 4 | 4 | ||
| @@ -1,4 +1,4 @@ | |||||
| 1 | - | //go:generate mockgen -destination=mocks/mock_ports.go -package=mocks . FileSystem,File,CommandExecutor,ChrootExecutor,ScriptExecutor,HTTPClient,Response,Logger,InstallationRepository | 1 | + | //go:generate go run go.uber.org/mock/mockgen@latest -destination=mocks/mock_ports.go -package=mocks . FileSystem,File,CommandExecutor,ChrootExecutor,ScriptExecutor,HTTPClient,Response,Logger,InstallationRepository |
| 2 | 2 | ||||
| 3 | package ports | 3 | package ports | ||
| 4 | 4 | ||||
M internal/infrastructure/executor/chroot_test.go +1 -1
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | 7 | "testing" | |
| 8 | 8 | ||
| 9 | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | |
| 10 | - | "github.com/golang/mock/gomock" | |
| 10 | + | "go.uber.org/mock/gomock" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func TestChrootExecutor_NewChrootExecutor(t *testing.T) { | |
| @@ -7,7 +7,7 @@ import ( | |||||
| 7 | "testing" | 7 | "testing" | ||
| 8 | 8 | ||||
| 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | ||
| 10 | - | "github.com/golang/mock/gomock" | 10 | + | "go.uber.org/mock/gomock" |
| 11 | ) | 11 | ) | ||
| 12 | 12 | ||||
| 13 | func TestChrootExecutor_NewChrootExecutor(t *testing.T) { | 13 | func TestChrootExecutor_NewChrootExecutor(t *testing.T) { | ||
M internal/infrastructure/executor/script_test.go +1 -1
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | 7 | "testing" | |
| 8 | 8 | ||
| 9 | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | |
| 10 | - | "github.com/golang/mock/gomock" | |
| 10 | + | "go.uber.org/mock/gomock" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func TestScriptExecutor_NewScriptExecutor(t *testing.T) { | |
| @@ -7,7 +7,7 @@ import ( | |||||
| 7 | "testing" | 7 | "testing" | ||
| 8 | 8 | ||||
| 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | ||
| 10 | - | "github.com/golang/mock/gomock" | 10 | + | "go.uber.org/mock/gomock" |
| 11 | ) | 11 | ) | ||
| 12 | 12 | ||||
| 13 | func TestScriptExecutor_NewScriptExecutor(t *testing.T) { | 13 | func TestScriptExecutor_NewScriptExecutor(t *testing.T) { | ||
M internal/infrastructure/executor/shell_test.go +1 -1
| @@ -7,7 +7,7 @@ import ( | |||
| 7 | 7 | "time" | |
| 8 | 8 | ||
| 9 | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | |
| 10 | - | "github.com/golang/mock/gomock" | |
| 10 | + | "go.uber.org/mock/gomock" | |
| 11 | 11 | ) | |
| 12 | 12 | ||
| 13 | 13 | func TestShellExecutor_Execute_Success(t *testing.T) { | |
| @@ -7,7 +7,7 @@ import ( | |||||
| 7 | "time" | 7 | "time" | ||
| 8 | 8 | ||||
| 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | 9 | "github.com/bnema/archup/internal/domain/ports/mocks" | ||
| 10 | - | "github.com/golang/mock/gomock" | 10 | + | "go.uber.org/mock/gomock" |
| 11 | ) | 11 | ) | ||
| 12 | 12 | ||||
| 13 | func TestShellExecutor_Execute_Success(t *testing.T) { | 13 | func TestShellExecutor_Execute_Success(t *testing.T) { | ||