Responses is a collection of mocked responses to Provision operations.
| 310 | |
| 311 | // Responses is a collection of mocked responses to Provision operations. |
| 312 | type Responses struct { |
| 313 | Parse []*proto.Response |
| 314 | |
| 315 | // Used to mock ALL responses regardless of transition. |
| 316 | ProvisionInit []*proto.Response |
| 317 | ProvisionPlan []*proto.Response |
| 318 | ProvisionApply []*proto.Response |
| 319 | ProvisionGraph []*proto.Response |
| 320 | |
| 321 | // Used to mock specific transition responses. They are prioritized over the generic responses. |
| 322 | ProvisionPlanMap map[proto.WorkspaceTransition][]*proto.Response |
| 323 | ProvisionApplyMap map[proto.WorkspaceTransition][]*proto.Response |
| 324 | ProvisionGraphMap map[proto.WorkspaceTransition][]*proto.Response |
| 325 | |
| 326 | ExtraFiles map[string][]byte |
| 327 | } |
| 328 | |
| 329 | func isType[T any](x any) bool { |
| 330 | _, ok := x.(T) |
nothing calls this directly
no outgoing calls
no test coverage detected