(ctx context.Context, url string)
| 208 | } |
| 209 | |
| 210 | func wstestCaseCount(ctx context.Context, url string) (cases int, err error) { |
| 211 | defer errd.Wrap(&err, "failed to get case count") |
| 212 | |
| 213 | c, _, err := websocket.Dial(ctx, url+"/getCaseCount", nil) |
| 214 | if err != nil { |
| 215 | return 0, err |
| 216 | } |
| 217 | defer c.Close(websocket.StatusInternalError, "") |
| 218 | |
| 219 | _, r, err := c.Reader(ctx) |
| 220 | if err != nil { |
| 221 | return 0, err |
| 222 | } |
| 223 | b, err := io.ReadAll(r) |
| 224 | if err != nil { |
| 225 | return 0, err |
| 226 | } |
| 227 | cases, err = strconv.Atoi(string(b)) |
| 228 | if err != nil { |
| 229 | return 0, err |
| 230 | } |
| 231 | |
| 232 | c.Close(websocket.StatusNormalClosure, "") |
| 233 | |
| 234 | return cases, nil |
| 235 | } |
| 236 | |
| 237 | func checkWSTestIndex(t *testing.T, path string) { |
| 238 | wstestOut, err := os.ReadFile(path) |
no test coverage detected
searching dependent graphs…