(t *testing.T)
| 197 | } |
| 198 | |
| 199 | func TestTopicShare(t *testing.T) { |
| 200 | if err := adp.TopicShare(testData.Subs[0].Topic, testData.Subs); err != nil { |
| 201 | t.Fatal(err) |
| 202 | } |
| 203 | |
| 204 | // Must save recvseqid and readseqid separately because TopicShare |
| 205 | // ignores them. |
| 206 | for _, sub := range testData.Subs { |
| 207 | adp.SubsUpdate(sub.Topic, types.ParseUid(sub.User), map[string]any{ |
| 208 | "delid": sub.DelId, |
| 209 | "recvseqid": sub.RecvSeqId, |
| 210 | "readseqid": sub.ReadSeqId, |
| 211 | }) |
| 212 | } |
| 213 | |
| 214 | // Update topic SeqId because it's not saved at creation time but used by the tests. |
| 215 | for _, tpc := range testData.Topics { |
| 216 | err := adp.TopicUpdate(tpc.Id, map[string]any{ |
| 217 | "seqid": tpc.SeqId, |
| 218 | "delid": tpc.DelId, |
| 219 | }) |
| 220 | if err != nil { |
| 221 | t.Error(err) |
| 222 | } |
| 223 | } |
| 224 | } |
| 225 | |
| 226 | func TestMessageSave(t *testing.T) { |
| 227 | for _, msg := range testData.Msgs { |
nothing calls this directly
no test coverage detected
searching dependent graphs…