MCPcopy Index your code
hub / github.com/coder/coder / TestStepStatusForError

Function TestStepStatusForError

coderd/x/chatd/chatdebug/model_internal_test.go:461–478  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

459}
460
461func TestStepStatusForError(t *testing.T) {
462 t.Parallel()
463
464 t.Run("Canceled", func(t *testing.T) {
465 t.Parallel()
466 require.Equal(t, StatusInterrupted, stepStatusForError(context.Canceled))
467 })
468
469 t.Run("DeadlineExceeded", func(t *testing.T) {
470 t.Parallel()
471 require.Equal(t, StatusInterrupted, stepStatusForError(context.DeadlineExceeded))
472 })
473
474 t.Run("OtherError", func(t *testing.T) {
475 t.Parallel()
476 require.Equal(t, StatusError, stepStatusForError(xerrors.New("boom")))
477 })
478}
479
480func TestDebugModel_Stream(t *testing.T) {
481 t.Parallel()

Callers

nothing calls this directly

Calls 4

stepStatusForErrorFunction · 0.85
RunMethod · 0.65
NewMethod · 0.65
EqualMethod · 0.45

Tested by

no test coverage detected