MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / TestParseRepoJSON

Function TestParseRepoJSON

internal/repoconfig/repoconfig_test.go:147–170  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

145}
146
147func TestParseRepoJSON(t *testing.T) {
148 input := `{
149 "my-org/my-repo": {
150 "owner": "my-org",
151 "name": "my-repo",
152 "branch": "main",
153 "enabled": true
154 }
155 }`
156 repos, err := parseRepoJSON([]byte(input))
157 if err != nil {
158 t.Fatalf("parseRepoJSON: %v", err)
159 }
160 if len(repos) != 1 {
161 t.Fatalf("expected 1 repo, got %d", len(repos))
162 }
163 r := repos["my-org/my-repo"]
164 if r.Owner != "my-org" || r.Name != "my-repo" {
165 t.Errorf("unexpected owner/name: %q/%q", r.Owner, r.Name)
166 }
167 if r.CatalogFile != "" {
168 t.Errorf("unexpected catalog file: %q", r.CatalogFile)
169 }
170}
171
172func TestParseRepoJSONCatalogFile(t *testing.T) {
173 input := `{

Callers

nothing calls this directly

Calls 1

parseRepoJSONFunction · 0.85

Tested by

no test coverage detected