(now time.Time, users []*types.User, topics []*types.Topic)
| 176 | } |
| 177 | |
| 178 | func initSubs(now time.Time, users []*types.User, topics []*types.Topic) []*types.Subscription { |
| 179 | subs := make([]*types.Subscription, 0, 6) |
| 180 | subs = append(subs, &types.Subscription{ |
| 181 | ObjHeader: types.ObjHeader{ |
| 182 | CreatedAt: now, |
| 183 | UpdatedAt: now.Add(10 * time.Minute), |
| 184 | }, |
| 185 | User: users[0].Id, |
| 186 | Topic: topics[0].Id, |
| 187 | RecvSeqId: 5, |
| 188 | ReadSeqId: 1, |
| 189 | ModeWant: 255, |
| 190 | ModeGiven: 255, |
| 191 | }) |
| 192 | subs = append(subs, &types.Subscription{ |
| 193 | ObjHeader: types.ObjHeader{ |
| 194 | CreatedAt: now, |
| 195 | UpdatedAt: now.Add(15 * time.Minute), |
| 196 | }, |
| 197 | User: users[1].Id, |
| 198 | Topic: topics[0].Id, |
| 199 | RecvSeqId: 6, |
| 200 | ReadSeqId: 3, |
| 201 | ModeWant: 47, |
| 202 | ModeGiven: 47, |
| 203 | }) |
| 204 | subs = append(subs, &types.Subscription{ |
| 205 | ObjHeader: types.ObjHeader{ |
| 206 | CreatedAt: now.Add(-10 * time.Hour), |
| 207 | UpdatedAt: now.Add(-10 * time.Hour), |
| 208 | }, |
| 209 | User: users[0].Id, |
| 210 | Topic: topics[1].Id, |
| 211 | RecvSeqId: 9, |
| 212 | ReadSeqId: 5, |
| 213 | ModeWant: 47, |
| 214 | ModeGiven: 47, |
| 215 | }) |
| 216 | subs = append(subs, &types.Subscription{ |
| 217 | ObjHeader: types.ObjHeader{ |
| 218 | CreatedAt: now, |
| 219 | UpdatedAt: now.Add(20 * time.Minute), |
| 220 | }, |
| 221 | User: users[1].Id, |
| 222 | Topic: topics[1].Id, |
| 223 | RecvSeqId: 9, |
| 224 | ReadSeqId: 5, |
| 225 | ModeWant: 47, |
| 226 | ModeGiven: 47, |
| 227 | }) |
| 228 | subs = append(subs, &types.Subscription{ |
| 229 | ObjHeader: types.ObjHeader{ |
| 230 | CreatedAt: now, |
| 231 | UpdatedAt: now.Add(30 * time.Minute), |
| 232 | }, |
| 233 | User: users[2].Id, |
| 234 | Topic: topics[2].Id, |
| 235 | RecvSeqId: 0, |
no test coverage detected
searching dependent graphs…