(t *testing.T)
| 42 | } |
| 43 | |
| 44 | func TestContextWithStepRoundTrip(t *testing.T) { |
| 45 | t.Parallel() |
| 46 | |
| 47 | sc := &chatdebug.StepContext{ |
| 48 | StepID: uuid.New(), |
| 49 | RunID: uuid.New(), |
| 50 | ChatID: uuid.New(), |
| 51 | StepNumber: 7, |
| 52 | Operation: chatdebug.OperationStream, |
| 53 | HistoryTipMessageID: 33, |
| 54 | } |
| 55 | |
| 56 | ctx := chatdebug.ContextWithStep(context.Background(), sc) |
| 57 | got, ok := chatdebug.StepFromContext(ctx) |
| 58 | require.True(t, ok) |
| 59 | require.Same(t, sc, got) |
| 60 | require.Equal(t, *sc, *got) |
| 61 | } |
| 62 | |
| 63 | func TestStepFromContextAbsent(t *testing.T) { |
| 64 | t.Parallel() |
nothing calls this directly
no test coverage detected