AssertTestTelemetryEvents verifies the completed invocation event shape.
(t *testing.T, events []ghtelemetry.Event, attachCount int, result UploadResult)
| 42 | |
| 43 | // AssertTestTelemetryEvents verifies the completed invocation event shape. |
| 44 | func AssertTestTelemetryEvents(t *testing.T, events []ghtelemetry.Event, attachCount int, result UploadResult) { |
| 45 | t.Helper() |
| 46 | |
| 47 | require.Equal(t, []ghtelemetry.Event{ |
| 48 | { |
| 49 | Type: "attachment_invocation", |
| 50 | Dimensions: ghtelemetry.Dimensions{"command": "gh test"}, |
| 51 | Measures: ghtelemetry.Measures{ |
| 52 | "attach_count": int64(attachCount), |
| 53 | "append_ops_count": int64(result.AppendOperations), |
| 54 | "replace_ops_count": int64(result.ReplaceOperations), |
| 55 | }, |
| 56 | }, |
| 57 | }, events) |
| 58 | } |
| 59 | |
| 60 | // StubUpload registers one upload of name against repositoryID, answering with |
| 61 | // status and body. |