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

Method guest

internal/server/commitment_graph_entry_test.go:59–68  ·  view source on GitHub ↗
(edit ...int)

Source from the content-addressed store, hash-verified

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", "")
62 for _, i := range edit {
63 if _, err := f.srv.store.CreateItemGrant(f.ws.ID, f.items[i].ID, u.ID, "edit", f.owner.ID); err != nil {
64 f.t.Fatal(err)
65 }
66 }
67 return u
68}
69func (f *graphHTTP) reneg(tok string, preview bool, revision string, ack bool) *httptest.ResponseRecorder {
70 base, _ := time.Parse(time.RFC3339, f.dates[0])
71 to := base.Add(15 * 24 * time.Hour).Format(time.RFC3339)

Calls 4

mustUserFunction · 0.85
HelperMethod · 0.80
CreateItemGrantMethod · 0.80
FatalMethod · 0.80

Tested by

no test coverage detected