MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / link

Method link

internal/server/commitment_graph_entry_test.go:45–58  ·  view source on GitHub ↗
(p, c int, pr, cr, policy string)

Source from the content-addressed store, hash-verified

43 return models.CommitmentRolesInput{DeadlineDays: &d, DeadlineSecs: &s, DeadlineBehavior: &b}
44}
45func (f *graphHTTP) link(p, c int, pr, cr, policy string) {
46 f.t.Helper()
47 in := models.ScheduleLinkCreate{ParentItemID: f.items[p].ID, ParentRole: pr, ChildItemID: f.items[c].ID, ChildRole: cr, Offset: models.ScheduleLinkOffset{Mode: "elapsed", ElapsedSecs: 86400}, CancelPolicy: policy, Move: models.LinkWriteOptions{Preview: true, Reason: "Initial link"}}
48 pvw, err := f.srv.store.CreateScheduleLink(f.ws.ID, in, f.access)
49 if err != nil {
50 f.t.Fatal(err)
51 }
52 in.Move.Preview = false
53 in.Move.Revision = pvw.Moved.Revision
54 in.Move.AcknowledgeViolations = true
55 if _, err := f.srv.store.CreateScheduleLink(f.ws.ID, in, f.access); err != nil {
56 f.t.Fatal(err)
57 }
58}
59func (f *graphHTTP) guest(edit ...int) *models.User {
60 f.t.Helper()
61 u := mustUser(f.t, f.srv, "graph-guest@example.com", "graphguest", "")

Calls 3

HelperMethod · 0.80
CreateScheduleLinkMethod · 0.80
FatalMethod · 0.80

Tested by

no test coverage detected