MCPcopy Create free account
hub / github.com/astercloud/aster / TestReject

Function TestReject

pkg/executionplan/types_test.go:262–279  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

260}
261
262func TestReject(t *testing.T) {
263 plan := NewExecutionPlan("Test plan")
264 rejectionNote := "Not suitable for execution"
265
266 plan.Reject(rejectionNote)
267
268 if plan.UserApproved {
269 t.Error("expected UserApproved to be false")
270 }
271
272 if plan.RejectionNote != rejectionNote {
273 t.Errorf("expected RejectionNote %q, got %q", rejectionNote, plan.RejectionNote)
274 }
275
276 if plan.Status != StatusCancelled {
277 t.Errorf("expected status %v, got %v", StatusCancelled, plan.Status)
278 }
279}
280
281func TestMarkStepStarted(t *testing.T) {
282 plan := NewExecutionPlan("Test plan")

Callers

nothing calls this directly

Calls 3

RejectMethod · 0.95
NewExecutionPlanFunction · 0.85
ErrorMethod · 0.65

Tested by

no test coverage detected