@@ -50,12 +50,12 @@ func TestBootstrapCatalogCommand(t *testing.T) {
50
50
assert .Contains (t , bootstrapContent , catalog .DockerCLIServerName , "bootstrap catalog should contain docker server" )
51
51
52
52
// Parse the YAML to ensure it's valid
53
- var registry map [string ]interface {}
53
+ var registry map [string ]any
54
54
err = yaml .Unmarshal (content , & registry )
55
55
require .NoError (t , err , "bootstrap catalog should be valid YAML" )
56
56
57
57
// Verify structure
58
- registryMap , ok := registry ["registry" ].(map [string ]interface {} )
58
+ registryMap , ok := registry ["registry" ].(map [string ]any )
59
59
require .True (t , ok , "bootstrap catalog should have registry map" )
60
60
61
61
// Check that we have exactly the Docker servers
@@ -109,7 +109,7 @@ func TestBootstrapInvalidPath(t *testing.T) {
109
109
// Test bootstrapping to invalid path (use a file as directory path)
110
110
// Create a file that will conflict with the directory creation
111
111
conflictFile := filepath .Join (tempHome , "conflict-file" )
112
- err := os .WriteFile (conflictFile , []byte ("test" ), 0644 )
112
+ err := os .WriteFile (conflictFile , []byte ("test" ), 0o644 )
113
113
require .NoError (t , err )
114
114
115
115
// Try to bootstrap to a path that treats the file as a directory
@@ -172,7 +172,7 @@ func setupTestDockerCatalog(t *testing.T, homeDir string) {
172
172
// Create .docker/mcp directory structure
173
173
mcpDir := filepath .Join (homeDir , ".docker" , "mcp" )
174
174
catalogsDir := filepath .Join (mcpDir , "catalogs" )
175
- err := os .MkdirAll (catalogsDir , 0755 )
175
+ err := os .MkdirAll (catalogsDir , 0o755 )
176
176
require .NoError (t , err )
177
177
178
178
// Create catalog.json registry
@@ -185,7 +185,7 @@ func setupTestDockerCatalog(t *testing.T, homeDir string) {
185
185
}
186
186
}
187
187
}`
188
- err = os .WriteFile (filepath .Join (mcpDir , "catalog.json" ), []byte (catalogRegistry ), 0644 )
188
+ err = os .WriteFile (filepath .Join (mcpDir , "catalog.json" ), []byte (catalogRegistry ), 0o644 )
189
189
require .NoError (t , err )
190
190
191
191
// Create minimal docker-mcp.yaml catalog with dockerhub and docker servers
@@ -204,7 +204,7 @@ func setupTestDockerCatalog(t *testing.T, homeDir string) {
204
204
image: "docker@sha256:test456"
205
205
tools:
206
206
- name: "docker"`
207
- err = os .WriteFile (filepath .Join (catalogsDir , "docker-mcp.yaml" ), []byte (dockerCatalog ), 0644 )
207
+ err = os .WriteFile (filepath .Join (catalogsDir , "docker-mcp.yaml" ), []byte (dockerCatalog ), 0o644 )
208
208
require .NoError (t , err )
209
209
}
210
210
@@ -215,7 +215,7 @@ func setupDetailedTestDockerCatalog(t *testing.T, homeDir string) {
215
215
// Create .docker/mcp directory structure
216
216
mcpDir := filepath .Join (homeDir , ".docker" , "mcp" )
217
217
catalogsDir := filepath .Join (mcpDir , "catalogs" )
218
- err := os .MkdirAll (catalogsDir , 0755 )
218
+ err := os .MkdirAll (catalogsDir , 0o755 )
219
219
require .NoError (t , err )
220
220
221
221
// Create catalog.json registry
@@ -228,7 +228,7 @@ func setupDetailedTestDockerCatalog(t *testing.T, homeDir string) {
228
228
}
229
229
}
230
230
}`
231
- err = os .WriteFile (filepath .Join (mcpDir , "catalog.json" ), []byte (catalogRegistry ), 0644 )
231
+ err = os .WriteFile (filepath .Join (mcpDir , "catalog.json" ), []byte (catalogRegistry ), 0o644 )
232
232
require .NoError (t , err )
233
233
234
234
// Create more detailed docker-mcp.yaml catalog with multiple servers
@@ -291,6 +291,6 @@ func setupDetailedTestDockerCatalog(t *testing.T, homeDir string) {
291
291
image: "mcp/elasticsearch@sha256:testxyz"
292
292
tools:
293
293
- name: "search"`
294
- err = os .WriteFile (filepath .Join (catalogsDir , "docker-mcp.yaml" ), []byte (dockerCatalog ), 0644 )
294
+ err = os .WriteFile (filepath .Join (catalogsDir , "docker-mcp.yaml" ), []byte (dockerCatalog ), 0o644 )
295
295
require .NoError (t , err )
296
296
}
0 commit comments