X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=test%2Ftest-data%2Fdb-integration.js;fp=test%2Ftest-data%2Fdb-integration.js;h=a94611c09bf64902d2e91c5a6a4d01b608da1c9f;hb=9696c012e6b9a6c58904baa397ca0ebf78112316;hp=0000000000000000000000000000000000000000;hpb=f59e918f3aba3a218c94a252072801fc40527647;p=websub-hub diff --git a/test/test-data/db-integration.js b/test/test-data/db-integration.js new file mode 100644 index 0000000..a94611c --- /dev/null +++ b/test/test-data/db-integration.js @@ -0,0 +1,54 @@ +'use strict'; + +const remoteAddress = '127.0.0.10'; +const callbackUrl = 'https://example.com/consume?id=123&token=abc'; +const topicUrl = 'https://example.com/some_blog'; +const modeSubscribe = 'subscribe'; + +module.exports = { + topicSet: { + url: topicUrl, + leaseSecondsPreferred: null, + leaseSecondsMin: 86400, + leaseSecondsMax: 8640000, + publisherValidationUrl: null, + }, + anotherTopicSet: { + url: 'https://example.com/another_blog/', + leaseSecondsPreferred: null, + leaseSecondsMin: 86400, + leaseSecondsMax: 8640000, + publisherValidationUrl: null, + }, + topicUpdate: { + url: topicUrl, + leaseSecondsPreferred: 864000, + }, + topicSetContent: { + topicId: undefined, + content: 'content', + contentHash: 'b2d1d285b5199c85f988d03649c37e44fd3dde01e5d69c50fef90651962f48110e9340b60d49a479c4c0b53f5f07d690686dd87d2481937a512e8b85ee7c617f', + contentType: 'text/plain', + }, + subscriptionUpsert: { + callback: callbackUrl, + topicId: undefined, + leaseSeconds: 172800, + secret: 'SecretSecret', + httpRemoteAddr: remoteAddress, + }, + verificationInsert: { + topicId: undefined, + callback: callbackUrl, + mode: modeSubscribe, + secret: 'SecretSecret', + leaseSeconds: 864000, + httpRemoteAddr: remoteAddress, + isPublisherValidated: false, + }, + verificationUpdate: { + mode: modeSubscribe, + reason: 'reason', + isPublisherValidated: true, + }, +}; \ No newline at end of file