detached e26872f

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 Unverified2B82207D370127A0 The 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 (
77 github.com/charmbracelet/bubbletea v1.3.10
88 github.com/charmbracelet/huh v0.8.0
99 github.com/charmbracelet/lipgloss v1.1.0
10- github.com/golang/mock v1.6.0
1110 github.com/google/uuid v1.6.0
1211 go.uber.org/mock v0.6.0
1312 )
@@ -7,7 +7,6 @@ require (
7 github.com/charmbracelet/bubbletea v1.3.107 github.com/charmbracelet/bubbletea v1.3.10
8 github.com/charmbracelet/huh v0.8.08 github.com/charmbracelet/huh v0.8.0
9 github.com/charmbracelet/lipgloss v1.1.09 github.com/charmbracelet/lipgloss v1.1.0
10- github.com/golang/mock v1.6.0
11 github.com/google/uuid v1.6.010 github.com/google/uuid v1.6.0
12 go.uber.org/mock v0.6.011 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
22
33 package ports
44
@@ -1,4 +1,4 @@
1-//go:generate mockgen -destination=mocks/mock_ports.go -package=mocks . FileSystem,File,CommandExecutor,ChrootExecutor,ScriptExecutor,HTTPClient,Response,Logger,InstallationRepository1+//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 ports3 package ports
4 4
M internal/infrastructure/executor/chroot_test.go +1 -1
@@ -7,7 +7,7 @@ import (
77 "testing"
88
99 "github.com/bnema/archup/internal/domain/ports/mocks"
10- "github.com/golang/mock/gomock"
10+ "go.uber.org/mock/gomock"
1111 )
1212
1313 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 (
77 "testing"
88
99 "github.com/bnema/archup/internal/domain/ports/mocks"
10- "github.com/golang/mock/gomock"
10+ "go.uber.org/mock/gomock"
1111 )
1212
1313 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 (
77 "time"
88
99 "github.com/bnema/archup/internal/domain/ports/mocks"
10- "github.com/golang/mock/gomock"
10+ "go.uber.org/mock/gomock"
1111 )
1212
1313 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) {

Keyboard shortcuts

Single-key shortcuts are on. ctrl k and esc work whatever this says.

ctrl k :
go to a section, branch, tag, file or repository
?
this list
j k
move the row cursor down / up
enter
open the row under the cursor; on Files, a directory opens or closes in place
↑ ↓ ← → home end
in the file tree (focus on a row): previous / next row, close / open a directory or go to its parent / first entry, first / last row. They never open a file
l h
on Files: open a directory or a file / close a directory or go up to its parent, then to the parent page. Elsewhere: into the side panel (on a merge request, its files) / back to the content; there j k move between its controls
g g G
first / last row
/
filter the list; on Files, find a file anywhere in the repository (esc clears, enter opens the best match)
b
switch branch or tag
g s g f g c g b g m g i g r g a
tabs: summary, files, commits, branches & tags, merge requests, issues, releases, actions (when available)
g h
home
w
wide mode: use the whole width of the screen, or not (remembered)
y
copy a permalink pinned to the commit
d u x
diff: split / unified / collapse or expand all
e E
diff: the whole file in view / every file, with the lines the hunks hide
n
merge request: next note in the diff
esc
close a dialog, leave a field

Branches 1

Tags 0

    ↑↓ moveenter openesc close