MCPcopy Index your code
hub / github.com/dnote/dnote / Login

Function Login

pkg/cli/testutils/main.go:55–60  ·  view source on GitHub ↗

Login simulates a logged in user by inserting credentials in the local database

(t *testing.T, ctx *context.DnoteCtx)

Source from the content-addressed store, hash-verified

53
54// Login simulates a logged in user by inserting credentials in the local database
55func Login(t *testing.T, ctx *context.DnoteCtx) {
56 LoginDB(t, ctx.DB)
57
58 ctx.SessionKey = "someSessionKey"
59 ctx.SessionKeyExpiry = time.Now().Add(24 * time.Hour).Unix()
60}
61
62// RemoveDir cleans up the test env represented by the given context
63func RemoveDir(t *testing.T, dir string) {

Callers 6

TestRemoteMigration1Function · 0.92
TestSendBooksFunction · 0.92
TestSendBooks_isBehindFunction · 0.92
TestSendNotesFunction · 0.92
TestSendNotes_addedOnFunction · 0.92
TestSendNotes_isBehindFunction · 0.92

Calls 2

LoginDBFunction · 0.85
NowMethod · 0.65

Tested by 6

TestRemoteMigration1Function · 0.74
TestSendBooksFunction · 0.74
TestSendBooks_isBehindFunction · 0.74
TestSendNotesFunction · 0.74
TestSendNotes_addedOnFunction · 0.74
TestSendNotes_isBehindFunction · 0.74