fix: cassandra + mongo + arangodb issues with webhook

This commit is contained in:
Lakhan Samani
2022-07-12 11:48:42 +05:30
parent bfbeb6add2
commit 6b57bce6d9
19 changed files with 167 additions and 94 deletions

View File

@@ -24,7 +24,11 @@ func deleteWebhookTest(t *testing.T, s TestSetup) {
req.Header.Set("Cookie", fmt.Sprintf("%s=%s", constants.AdminCookieName, h))
// get all webhooks
webhooks, err := db.Provider.ListWebhook(ctx, model.Pagination{})
webhooks, err := db.Provider.ListWebhook(ctx, model.Pagination{
Limit: 10,
Page: 1,
Offset: 0,
})
assert.NoError(t, err)
for _, w := range webhooks.Webhooks {
@@ -37,12 +41,17 @@ func deleteWebhookTest(t *testing.T, s TestSetup) {
assert.NotEmpty(t, res.Message)
}
webhooks, err = db.Provider.ListWebhook(ctx, model.Pagination{})
webhooks, err = db.Provider.ListWebhook(ctx, model.Pagination{
Limit: 10,
Page: 1,
Offset: 0,
})
assert.NoError(t, err)
assert.Len(t, webhooks.Webhooks, 0)
webhookLogs, err := db.Provider.ListWebhookLogs(ctx, model.Pagination{
Limit: 10,
Limit: 100,
Page: 1,
Offset: 0,
}, "")
assert.NoError(t, err)
assert.Len(t, webhookLogs.WebhookLogs, 0)