(t *testing.T)
| 22 | } |
| 23 | |
| 24 | func createSearchTestFiles(t *testing.T) string { |
| 25 | t.Helper() |
| 26 | tmpDir := t.TempDir() |
| 27 | |
| 28 | files := map[string]string{ |
| 29 | "001-auth.md": `--- |
| 30 | id: "001" |
| 31 | title: "Implement authentication system" |
| 32 | status: pending |
| 33 | priority: high |
| 34 | tags: |
| 35 | - security |
| 36 | created: 2026-01-01 |
| 37 | --- |
| 38 | |
| 39 | # Implement authentication system |
| 40 | |
| 41 | Add JWT-based authentication with login and logout endpoints. |
| 42 | Include token refresh and session management. |
| 43 | `, |
| 44 | "002-deploy.md": `--- |
| 45 | id: "002" |
| 46 | title: "Set up deployment pipeline" |
| 47 | status: in-progress |
| 48 | priority: medium |
| 49 | tags: |
| 50 | - devops |
| 51 | created: 2026-01-02 |
| 52 | --- |
| 53 | |
| 54 | # Set up deployment pipeline |
| 55 | |
| 56 | Configure CI/CD with automated testing and staging environment. |
| 57 | The authentication service should be deployed first. |
| 58 | `, |
| 59 | "003-docs.md": `--- |
| 60 | id: "003" |
| 61 | title: "Write API documentation" |
| 62 | status: completed |
| 63 | priority: low |
| 64 | tags: |
| 65 | - docs |
| 66 | created: 2026-01-03 |
| 67 | --- |
| 68 | |
| 69 | # Write API documentation |
| 70 | |
| 71 | Document all REST endpoints including request and response schemas. |
| 72 | `, |
| 73 | } |
| 74 | |
| 75 | for name, content := range files { |
| 76 | err := os.WriteFile(filepath.Join(tmpDir, name), []byte(content), 0644) |
| 77 | if err != nil { |
| 78 | t.Fatalf("failed to create test file %s: %v", name, err) |
| 79 | } |
| 80 | } |
| 81 |
no outgoing calls
no test coverage detected