Skip to content

Commit e7f017e

Browse files
committed
admin: drop unreachable tables map from delete-gate test (Claude review)
One nit follow-up from Claude review #5 on f901d70: The delete-path cases in TestDynamoHandler_ForwarderNotInvokedForNonNotLeaderError constructed stubTablesSource with both a tables map and deleteErr. stubTablesSource.AdminDeleteTable returns early on deleteErr != nil before consulting the map, so the map was unreachable in all three delete cases. Now matches the create-path style (deleteErr only), removing a mild "the map matters" misread.
1 parent f901d70 commit e7f017e

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

internal/admin/forward_integration_test.go

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,11 @@ func TestDynamoHandler_ForwarderNotInvokedForNonNotLeaderError(t *testing.T) {
217217
for _, tc := range deleteCases {
218218
t.Run("delete/"+tc.name, func(t *testing.T) {
219219
fwd := &stubLeaderForwarder{}
220-
src := &stubTablesSource{
221-
tables: map[string]*DynamoTableSummary{"users": {Name: "users"}},
222-
deleteErr: tc.err,
223-
}
220+
// stubTablesSource.AdminDeleteTable returns early on
221+
// deleteErr != nil before consulting the tables map, so
222+
// the map is unreachable here — drop it for symmetry
223+
// with the create-path cases above.
224+
src := &stubTablesSource{deleteErr: tc.err}
224225
h := NewDynamoHandler(src).WithLeaderForwarder(fwd)
225226
req := httptest.NewRequest(http.MethodDelete, pathDynamoTables+"/users", nil)
226227
req = withWritePrincipal(req)

0 commit comments

Comments
 (0)