(client telemetry.TelemetryClient, commandPath string)
| 40 | func (r *recordingTelemetryClient) Close() {} |
| 41 | |
| 42 | func newTelemetryContext(client telemetry.TelemetryClient, commandPath string) context.Context { |
| 43 | metadata := telemetry.NewEventMetadata() |
| 44 | metadata.SetCommandPath(commandPath) |
| 45 | ctx := telemetry.WithEventMetadata(context.Background(), metadata) |
| 46 | return telemetry.WithTelemetryClient(ctx, client) |
| 47 | } |
| 48 | |
| 49 | func TestTrackCommandCompleted_SkipsWhenPreRunNeverRan(t *testing.T) { |
| 50 | client := &recordingTelemetryClient{} |
no test coverage detected