You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
6.**Lint Last**: Only run linting when implementation is complete
115
+
116
+
### Error Handling Strategy
117
+
118
+
#### Test Failures
119
+
```bash
120
+
make test
121
+
# If tests fail, fix the code, don't skip tests
122
+
```
123
+
124
+
#### Build Failures
125
+
```bash
126
+
make docker-mcp
127
+
# If build fails, check compilation errors and fix
128
+
# Don't proceed to manual testing until build succeeds
129
+
```
130
+
131
+
#### Lint Failures (End of Development)
132
+
```bash
133
+
make lint-darwin
134
+
# Fix all linting issues before marking feature complete
135
+
```
136
+
137
+
### Baseline Verification ✅
138
+
139
+
The following baseline tests have been verified to work:
140
+
-`make docker-mcp` - Builds successfully
141
+
-`make test` - All existing tests pass
142
+
-`make lint-darwin` - 0 linting issues
143
+
- CLI functionality verified working
144
+
145
+
**Ready to begin TDD implementation following the above workflow.**
146
+
147
+
## 🧪 Test Strategy Overview
148
+
149
+
### Required Test Files for TDD Implementation
150
+
151
+
Each implementation section below specifies **TEST FIRST** requirements. These test files must be created with failing tests before writing implementation code:
152
+
153
+
| Component | Test File | Purpose |
154
+
|-----------|-----------|---------|
155
+
| Feature Management |`cmd/docker-mcp/commands/feature_test.go`| Test feature enable/disable/list commands |
156
+
| Gateway Enhancement |`cmd/docker-mcp/commands/gateway_test.go`| Test --use-configured-catalogs flag validation |
157
+
| Catalog Loading |`cmd/docker-mcp/internal/catalog/catalog_test.go`| Test catalog precedence and loading logic |
158
+
| Export Command |`cmd/docker-mcp/catalog/export_test.go`| Test export functionality and protection |
159
+
| Command Visibility |`cmd/docker-mcp/catalog/*_test.go`| Test unhidden commands appear in help |
160
+
161
+
### Test-First Workflow Reminder
162
+
163
+
```bash
164
+
# 1. Write failing tests first
165
+
go test ./cmd/docker-mcp/commands -v # Should show failing tests
166
+
167
+
# 2. Write minimal implementation
168
+
go test ./cmd/docker-mcp/commands -v # Should show passing tests
169
+
170
+
# 3. Test broader scope
171
+
go test ./cmd/docker-mcp/... -v # Should show all integration tests pass
172
+
173
+
# 4. Test full system
174
+
make test# Should show all system tests pass
175
+
176
+
# 5. Build and verify
177
+
make docker-mcp # Should build successfully
178
+
```
179
+
9
180
## Quick Context for Claude Code Sessions
10
181
11
182
### What This Feature Does
@@ -26,11 +197,32 @@ Enable users to create and manage custom MCP server catalogs that automatically
26
197
### Phase 1: Core Implementation
27
198
28
199
#### 1.1 Feature Management System
200
+
201
+
**🧪 TEST FIRST**: `cmd/docker-mcp/commands/feature_test.go`
202
+
-[ ]**Write tests for feature command structure**
203
+
```go
204
+
// Test cases needed:
205
+
funcTestFeatureEnableCommand(t *testing.T) // Test enabling configured-catalogs
206
+
func TestFeatureDisableCommand(t *testing.T) // Test disabling configured-catalogs
207
+
func TestFeatureListCommand(t *testing.T) // Test listing all features and status
208
+
func TestFeatureInvalidFeature(t *testing.T) // Test error for unknown feature names
0 commit comments