createSession creates a session via the Store directly.
(t *testing.T, srv *Server[*schema.Message])
| 131 | |
| 132 | // createSession creates a session via the Store directly. |
| 133 | func createSession(t *testing.T, srv *Server[*schema.Message]) string { |
| 134 | t.Helper() |
| 135 | sess, err := srv.cfg.Store.GetOrCreate("test-" + time.Now().Format("150405.000")) |
| 136 | if err != nil { |
| 137 | t.Fatalf("create session: %v", err) |
| 138 | } |
| 139 | return sess.ID |
| 140 | } |
| 141 | |
| 142 | // --------------------------------------------------------------------------- |
| 143 | // Tests |
no test coverage detected