Skip to content

Commit e1f26f2

Browse files
JAORMXclaude
andcommitted
Fix registry lookup E2E: add dummy server to pass validation
The upstream registry file validator requires at least one server or group. Our test JSON had only skills with an empty servers array, which was rejected with 502. Add a minimal dummy server entry to satisfy the validation while keeping the focus on skill resolution. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent 87cae6b commit e1f26f2

1 file changed

Lines changed: 16 additions & 4 deletions

File tree

test/e2e/api_skills_test.go

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,21 @@ func createUpstreamRegistryWithSkill(skillName, ociReference string) string {
226226
"version": "1.0.0",
227227
"meta": map[string]string{"last_updated": "2025-01-01T00:00:00Z"},
228228
"data": map[string]interface{}{
229-
"servers": []interface{}{},
229+
// A dummy server is required because the config validator rejects
230+
// upstream registry files that contain no servers or groups.
231+
"servers": []map[string]interface{}{
232+
{
233+
"name": "dummy-server",
234+
"description": "Placeholder to satisfy registry validation",
235+
"repository": map[string]string{
236+
"url": "https://github.com/example/dummy",
237+
"type": "git",
238+
},
239+
"version_detail": map[string]string{
240+
"version": "0.0.1",
241+
},
242+
},
243+
},
230244
"skills": []map[string]interface{}{
231245
{
232246
"namespace": "e2e-test",
@@ -974,9 +988,7 @@ var _ = Describe("Skills API", Label("api", "api-clients", "skills", "e2e"), fun
974988
})
975989

976990
Describe("Registry lookup install", func() {
977-
// TODO(#4200): The upstream registry JSON schema validation rejects
978-
// the test fixture. Debug the exact required fields and re-enable.
979-
PIt("should resolve a plain name from the registry and install from OCI", func() {
991+
It("should resolve a plain name from the registry and install from OCI", func() {
980992
skillName := "registry-lookup-skill"
981993

982994
By("Starting an in-process OCI registry")

0 commit comments

Comments
 (0)