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

Method link

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

Source from the content-addressed store, hash-verified

46 return models.CommitmentRolesInput{DeadlineDays: &d, DeadlineSecs: &s, DeadlineBehavior: &b}
47}
48func (f *graphHTTP) link(p, c int, pr, cr, policy string) {
49 f.t.Helper()
50 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"}}
51 pvw, err := f.srv.store.CreateScheduleLink(f.ws.ID, in, f.access)
52 if err != nil {
53 f.t.Fatal(err)
54 }
55 in.Move.Preview = false
56 in.Move.Revision = pvw.Moved.Revision
57 in.Move.AcknowledgeViolations = true
58 if _, err := f.srv.store.CreateScheduleLink(f.ws.ID, in, f.access); err != nil {
59 f.t.Fatal(err)
60 }
61}
62func (f *graphHTTP) guest(edit ...int) *models.User {
63 f.t.Helper()
64 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