MCPcopy Create free account
hub / github.com/bytebase/bytebase / TestChange_PlanChecks_PollFailure

Function TestChange_PlanChecks_PollFailure

backend/api/mcp/tool_change_test.go:501–520  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

499}
500
501func TestChange_PlanChecks_PollFailure(t *testing.T) {
502 mock := newChangeMock(employeeDB())
503 mock.planCheckRunStatus = http.StatusInternalServerError
504 mock.issueResponse = defaultIssueResponse("APPROVED")
505 s := newChangeTestServer(t, mock)
506
507 _, structured, err := s.handleChange(testContext(), nil, ChangeInput{
508 Database: "employee_db",
509 SQL: "ALTER TABLE x ADD COLUMN y INT",
510 Title: "Test",
511 })
512 require.NoError(t, err)
513
514 output, ok := structured.(*ChangeOutput)
515 require.True(t, ok)
516 require.NotNil(t, output.PlanChecks)
517 require.Equal(t, "RUNNING", output.PlanChecks.Status)
518 // Issue still created.
519 require.NotEmpty(t, output.Issue)
520}
521
522// --- Rollout gating tests ---
523

Callers

nothing calls this directly

Calls 7

newChangeMockFunction · 0.85
employeeDBFunction · 0.85
defaultIssueResponseFunction · 0.85
newChangeTestServerFunction · 0.85
testContextFunction · 0.85
handleChangeMethod · 0.80
EqualMethod · 0.65

Tested by

no test coverage detected