(t *testing.T)
| 340 | } |
| 341 | |
| 342 | func TestUserLatencyInsights_BadRequest(t *testing.T) { |
| 343 | t.Parallel() |
| 344 | |
| 345 | client := coderdtest.New(t, &coderdtest.Options{}) |
| 346 | _ = coderdtest.CreateFirstUser(t, client) |
| 347 | |
| 348 | y, m, d := time.Now().UTC().Date() |
| 349 | today := time.Date(y, m, d, 0, 0, 0, 0, time.UTC) |
| 350 | |
| 351 | ctx, cancel := context.WithTimeout(context.Background(), testutil.WaitLong) |
| 352 | defer cancel() |
| 353 | |
| 354 | _, err := client.UserLatencyInsights(ctx, codersdk.UserLatencyInsightsRequest{ |
| 355 | StartTime: today, |
| 356 | EndTime: today.AddDate(0, 0, -1), |
| 357 | }) |
| 358 | assert.Error(t, err, "want error for end time before start time") |
| 359 | } |
| 360 | |
| 361 | func TestUserActivityInsights_BadRequest(t *testing.T) { |
| 362 | t.Parallel() |
nothing calls this directly
no test coverage detected