( t *testing.T, service coreModelCatalogService, boundHost string, )
| 173 | } |
| 174 | |
| 175 | func newHTTPModelCatalogRouter( |
| 176 | t *testing.T, |
| 177 | service coreModelCatalogService, |
| 178 | boundHost string, |
| 179 | ) http.Handler { |
| 180 | t.Helper() |
| 181 | |
| 182 | cfg := testConfigWithDisabledNetwork(newTestHomePaths(t)) |
| 183 | cfg.HTTP.Host = boundHost |
| 184 | cfg.HTTP.Port = 2123 |
| 185 | handlers := newHandlers(&handlerConfig{ |
| 186 | modelCatalog: service, |
| 187 | staticFS: mustStaticFS(t), |
| 188 | config: cfg, |
| 189 | boundHost: boundHost, |
| 190 | logger: discardLogger(), |
| 191 | startedAt: time.Date(2026, 4, 3, 12, 0, 0, 0, time.UTC), |
| 192 | now: func() time.Time { return time.Date(2026, 4, 3, 12, 0, 1, 0, time.UTC) }, |
| 193 | pollInterval: 5 * time.Millisecond, |
| 194 | agentLoader: aghconfig.LoadAgentDef, |
| 195 | httpPort: cfg.HTTP.Port, |
| 196 | workspaces: stubWorkspaceService{}, |
| 197 | tasks: stubTaskManager{}, |
| 198 | }) |
| 199 | return newTestRouter(t, handlers) |
| 200 | } |
| 201 | |
| 202 | type coreModelCatalogService interface { |
| 203 | ListModels(context.Context, modelcatalog.ListOptions) ([]modelcatalog.Model, error) |
no test coverage detected