test(client): drop navigation tests that inspected private fields
- commit
- e0f6671895e4872285eb37fd5ed147f339a380e1
- author
- brice · · 2026-10-08 20:07 UTC
- parent
- a46eff5
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
1 file · +0 -22
M internal/usecase/client/supervisor_navigation_test.go +0 -22
| @@ -3,7 +3,6 @@ package client | |||
| 3 | 3 | import ( | |
| 4 | 4 | "testing" | |
| 5 | 5 | ||
| 6 | - | "github.com/bnema/vev/internal/ports" | |
| 7 | 6 | "github.com/bnema/vev/internal/protocol" | |
| 8 | 7 | ) | |
| 9 | 8 | ||
| @@ -38,27 +37,6 @@ func TestNavigationState(t *testing.T) { | |||
| 38 | 37 | t.Fatal("resolveRoute on zero value = true, want false") | |
| 39 | 38 | } | |
| 40 | 39 | }}, | |
| 41 | - | {"buildRoutes creates ledger lazily", func(t *testing.T) { | |
| 42 | - | var n navigationState | |
| 43 | - | if n.routes != nil { | |
| 44 | - | t.Fatal("routes non-nil at zero value") | |
| 45 | - | } | |
| 46 | - | n.buildRoutes(ports.BrokerSnapshot{}, routeActive{}) | |
| 47 | - | if n.routes == nil { | |
| 48 | - | t.Fatal("routes nil after buildRoutes") | |
| 49 | - | } | |
| 50 | - | }}, | |
| 51 | - | {"takeSwap returns and clears", func(t *testing.T) { | |
| 52 | - | var n navigationState | |
| 53 | - | want := &pickerAttachmentTarget{} | |
| 54 | - | n.pendingSwap = want | |
| 55 | - | if got := n.takeSwap(); got != want { | |
| 56 | - | t.Fatalf("takeSwap = %p, want %p", got, want) | |
| 57 | - | } | |
| 58 | - | if n.pendingSwap != nil { | |
| 59 | - | t.Fatal("takeSwap kept swap") | |
| 60 | - | } | |
| 61 | - | }}, | |
| 62 | 40 | } | |
| 63 | 41 | for _, tt := range tests { | |
| 64 | 42 | t.Run(tt.name, tt.run) | |
| @@ -3,7 +3,6 @@ package client | |||||
| 3 | import ( | 3 | import ( | ||
| 4 | "testing" | 4 | "testing" | ||
| 5 | 5 | ||||
| 6 | - | "github.com/bnema/vev/internal/ports" | |||
| 7 | "github.com/bnema/vev/internal/protocol" | 6 | "github.com/bnema/vev/internal/protocol" | ||
| 8 | ) | 7 | ) | ||
| 9 | 8 | ||||
| @@ -38,27 +37,6 @@ func TestNavigationState(t *testing.T) { | |||||
| 38 | t.Fatal("resolveRoute on zero value = true, want false") | 37 | t.Fatal("resolveRoute on zero value = true, want false") | ||
| 39 | } | 38 | } | ||
| 40 | }}, | 39 | }}, | ||
| 41 | - | {"buildRoutes creates ledger lazily", func(t *testing.T) { | |||
| 42 | - | var n navigationState | |||
| 43 | - | if n.routes != nil { | |||
| 44 | - | t.Fatal("routes non-nil at zero value") | |||
| 45 | - | } | |||
| 46 | - | n.buildRoutes(ports.BrokerSnapshot{}, routeActive{}) | |||
| 47 | - | if n.routes == nil { | |||
| 48 | - | t.Fatal("routes nil after buildRoutes") | |||
| 49 | - | } | |||
| 50 | - | }}, | |||
| 51 | - | {"takeSwap returns and clears", func(t *testing.T) { | |||
| 52 | - | var n navigationState | |||
| 53 | - | want := &pickerAttachmentTarget{} | |||
| 54 | - | n.pendingSwap = want | |||
| 55 | - | if got := n.takeSwap(); got != want { | |||
| 56 | - | t.Fatalf("takeSwap = %p, want %p", got, want) | |||
| 57 | - | } | |||
| 58 | - | if n.pendingSwap != nil { | |||
| 59 | - | t.Fatal("takeSwap kept swap") | |||
| 60 | - | } | |||
| 61 | - | }}, | |||
| 62 | } | 40 | } | ||
| 63 | for _, tt := range tests { | 41 | for _, tt := range tests { | ||
| 64 | t.Run(tt.name, tt.run) | 42 | t.Run(tt.name, tt.run) | ||