Skip to content
This repository was archived by the owner on Mar 11, 2022. It is now read-only.

Commit bd55a1c

Browse files
committed
Added #db tag to tests that can use a real DB
1 parent ab3dd55 commit bd55a1c

File tree

10 files changed

+29
-29
lines changed

10 files changed

+29
-29
lines changed

test/client.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ describe('CloudantClient', function() {
239239
}, 8000);
240240
});
241241

242-
it('after plugin execution phase', function(done) {
242+
it('after plugin execution phase #db', function(done) {
243243
var mocks = nock(SERVER)
244244
.get(DBNAME)
245245
.reply(200, {doc_count: 1});
@@ -264,7 +264,7 @@ describe('CloudantClient', function() {
264264
});
265265
});
266266

267-
describe('using callbacks', function() {
267+
describe('#db using callbacks', function() {
268268
describe('with no plugins', function() {
269269
it('performs request and returns response', function(done) {
270270
var mocks = nock(SERVER)
@@ -816,7 +816,7 @@ describe('CloudantClient', function() {
816816
});
817817
});
818818

819-
describe('using listeners', function() {
819+
describe('#db using listeners', function() {
820820
describe('with no plugins', function() {
821821
it('performs request and returns response', function(done) {
822822
var mocks = nock(SERVER)

test/cloudant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const PASSWORD = process.env.cloudant_password || 'sjedon';
2626
const SERVER = process.env.SERVER_URL || `https://${ME}.cloudant.com`;
2727
const DBNAME = `nodejs-cloudant-${uuidv4()}`;
2828

29-
describe('Cloudant', function() {
29+
describe('Cloudant #db', function() {
3030
before(function(done) {
3131
var mocks = nock(SERVER)
3232
.put(`/${DBNAME}`)

test/issues/292.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const PASSWORD = process.env.cloudant_password || 'sjedon';
2626
const SERVER = process.env.SERVER_URL || `https://${ME}.cloudant.com`;
2727
const DBNAME = `nodejs-cloudant-${uuidv4()}`;
2828

29-
describe('Issue #292', function() {
29+
describe('#db Issue #292', function() {
3030
before(function(done) {
3131
var mocks = nock(SERVER)
3232
.put(`/${DBNAME}`)

test/legacy/api.js

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('Cloudant API', function() {
4343
});
4444
});
4545

46-
describe('Initialization', function() {
46+
describe('#db Initialization', function() {
4747
it('runs synchronously with one argument', function() {
4848
(function() {
4949
var db = Cloudant({account: ME});
@@ -110,7 +110,7 @@ describe('Initialization', function() {
110110
});
111111
});
112112

113-
describe('Authentication', function() {
113+
describe('#db Authentication', function() {
114114
it('supports Authentication API - POST /_api/v2/api_keys', function(done) {
115115
var mocks = nock(SERVER)
116116
.post('/_api/v2/api_keys').reply(200, { 'password': 'Eivln4jPiLS8BoTxjXjVukDT', 'ok': true, 'key': 'thandoodstrenterprourete' });
@@ -132,7 +132,7 @@ describe('Authentication', function() {
132132
});
133133
});
134134

135-
describe('CORS', function() {
135+
describe('#db CORS', function() {
136136
it('supports CORS API - GET /_api/v2/user/config/cors', function(done) {
137137
var mocks = nock(SERVER)
138138
.get('/_api/v2/user/config/cors').reply(200, { 'enable_cors': true, 'allow_credentials': true, 'origins': ['*']});
@@ -170,7 +170,7 @@ describe('CORS', function() {
170170
});
171171
});
172172

173-
describe('Authorization', function() {
173+
describe('#db Authorization', function() {
174174
var dbName;
175175

176176
before(function(done) {
@@ -239,7 +239,7 @@ describe('Authorization', function() {
239239
});
240240
});
241241

242-
describe('Cloudant-Specific APIs', function() {
242+
describe('#db Cloudant-Specific APIs', function() {
243243
var dbName;
244244

245245
before(function(done) {
@@ -349,7 +349,7 @@ describe('Cloudant-Specific APIs', function() {
349349
});
350350
});
351351

352-
describe('Changes query', function() {
352+
describe('#db Changes query', function() {
353353
var dbName;
354354

355355
before(function(done) {
@@ -465,7 +465,7 @@ describe('Changes query', function() {
465465
});
466466
});
467467

468-
describe('Changes follower', function() {
468+
describe('#db Changes follower', function() {
469469
var dbName;
470470

471471
before(function(done) {
@@ -606,7 +606,7 @@ describe('Changes follower', function() {
606606
});
607607
});
608608

609-
describe('Cloudant Query', function() {
609+
describe('#db Cloudant Query', function() {
610610
var dbName;
611611

612612
before(function(done) {
@@ -749,7 +749,7 @@ describe('Cloudant Query', function() {
749749
});
750750
});
751751

752-
describe('Cloudant Search', function() {
752+
describe('#db Cloudant Search', function() {
753753
var dbName;
754754

755755
before(function(done) {
@@ -938,7 +938,7 @@ describe('Gzip header tests', function() {
938938
});
939939

940940
if (!process.env.NOCK_OFF) {
941-
describe('Gzip attachment tests', test_gzip);
941+
describe('#db Gzip attachment tests', test_gzip);
942942
}
943943
function test_gzip() {
944944
it('checks that the zipped response is unzipped', function(done) {

test/legacy/plugin.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ var onAfter = function(done) {
8484
});
8585
};
8686

87-
describe('retry-on-429 plugin', function() {
87+
describe('retry-on-429 plugin #db', function() {
8888
before(onBefore);
8989
after(onAfter);
9090

@@ -125,7 +125,7 @@ describe('retry-on-429 plugin', function() {
125125
});
126126
});
127127

128-
describe('promise plugin', function() {
128+
describe('promise plugin #db', function() {
129129
before(onBefore);
130130
after(onAfter);
131131

@@ -159,7 +159,7 @@ describe('promise plugin', function() {
159159
});
160160
});
161161

162-
describe('cookieauth plugin', function() {
162+
describe('cookieauth plugin #db', function() {
163163
before(onBefore);
164164
after(onAfter);
165165

@@ -296,7 +296,7 @@ describe('cookieauth plugin', function() {
296296
});
297297
});
298298

299-
describe('custom plugin', function() {
299+
describe('custom plugin #db', function() {
300300
before(onBefore);
301301
after(onAfter);
302302

test/legacy/readme-examples.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var console = { log: function() {} };
4646
const alice = `nodejs_cloudant_test_${uuid()}`
4747
const my_db = `nodejs_cloudant_test_${uuid()}`
4848

49-
describe('Getting Started', function() {
49+
describe('#db Getting Started', function() {
5050
var mocks;
5151
after(function(done) {
5252
var Cloudant = require('@cloudant/cloudant');
@@ -121,7 +121,7 @@ describe('Getting Started', function() {
121121
});
122122
});
123123

124-
describe('Initialization', function() {
124+
describe('#db Initialization', function() {
125125
var mocks;
126126
after(function() {
127127
mocks.done();
@@ -257,7 +257,7 @@ describe('Authorization and API Keys', function() {
257257
});
258258
});
259259

260-
describe('CORS', function() {
260+
describe('CORS #db', function() {
261261
var mocks;
262262
after(function() { mocks.done(); });
263263
before(function() {
@@ -367,7 +367,7 @@ describe('Virtual Hosts', function() {
367367
});
368368
});
369369

370-
describe('Cloudant Query', function() {
370+
describe('Cloudant Query #db', function() {
371371
var mocks;
372372
before(function() {
373373
mocks = nock(SERVER)
@@ -447,7 +447,7 @@ describe('Cloudant Query', function() {
447447
});
448448
});
449449

450-
describe('Cloudant Search', function() {
450+
describe('Cloudant Search #db', function() {
451451
var mocks;
452452
before(function() {
453453
mocks = nock(SERVER)
@@ -550,7 +550,7 @@ describe('Cloudant Search', function() {
550550
});
551551
});
552552

553-
describe('Cookie Authentication', function() {
553+
describe('Cookie Authentication #db', function() {
554554
var cloudant;
555555
var mocks;
556556
after(function(done) {

test/plugins/cookieauth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ const MOCK_SET_COOKIE_HEADER = { 'set-cookie': `${MOCK_COOKIE}; Version=1; Max-A
3737
const MOCK_COOKIE_2 = 'AuthSession=Q2fbIWc0kQspdc39OQL89eS4PWECcYEZDxgdgy-0RCp2i0dcrDkfoWX7OI5A';
3838
const MOCK_SET_COOKIE_HEADER_2 = { 'set-cookie': `${MOCK_COOKIE_2}; Version=1; Max-Age=86400; Path=/; HttpOnly` };
3939

40-
describe('CookieAuth Plugin', function() {
40+
describe('#db CookieAuth Plugin', function() {
4141
before(function(done) {
4242
var mocks = nock(SERVER)
4343
.put(DBNAME)

test/plugins/iamauth.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ const MOCK_SET_IAM_SESSION_HEADER = {
6464
'set-cookie': `${MOCK_IAM_SESSION}; Version=1; Max-Age=3599; Secure; Path=/; HttpOnly; Secure`
6565
};
6666

67-
describe('IAMAuth Plugin', function() {
67+
describe('#db IAMAuth Plugin', function() {
6868
beforeEach(function() {
6969
if (process.env.SKIP_IAM_TESTS) {
7070
this.skip();

test/plugins/retry.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const PASSWORD = process.env.cloudant_password || 'sjedon';
2727
const SERVER = process.env.SERVER_URL || 'https://' + ME + '.cloudant.com';
2828
const DBNAME = `/nodejs-cloudant-${uuidv4()}`;
2929

30-
describe('Retry Plugin', function() {
30+
describe('#db Retry Plugin', function() {
3131
before(function(done) {
3232
var mocks = nock(SERVER)
3333
.put(DBNAME)

test/stream.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ const PASSWORD = process.env.cloudant_password || 'sjedon';
2828
const SERVER = process.env.SERVER_URL || `https://${ME}.cloudant.com`;
2929
const DBNAME = `/nodejs-cloudant-${uuidv4()}`;
3030

31-
describe('Stream', function() {
31+
describe('#db Stream', function() {
3232
before(function(done) {
3333
var mocks = nock(SERVER)
3434
.put(DBNAME)

0 commit comments

Comments
 (0)