X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=test%2Fsrc%2Fdb%2Fpostgres.js;h=5aff1e8cceafae1e8faffd3629105cf59a1955ca;hb=4f64b8910e1295207a42c757cb81c9b0e9ee3be2;hp=5df49fd662680fb2137adc32d8f7c77f2da7d986;hpb=9696c012e6b9a6c58904baa397ca0ebf78112316;p=websub-hub diff --git a/test/src/db/postgres.js b/test/src/db/postgres.js index 5df49fd..5aff1e8 100644 --- a/test/src/db/postgres.js +++ b/test/src/db/postgres.js @@ -155,17 +155,17 @@ describe('DatabasePostgres', function () { }); }); // _initTables - describe('schemaCheck', function () { + describe('initialize', function () { it('passes supported version', async function () { const version = { major: 1, minor: 0, patch: 0 }; sinon.stub(db.db, 'one').resolves(version); - await db.schemaCheck(false); + await db.initialize(false); }); it('fails low version', async function () { const version = { major: 0, minor: 0, patch: 0 }; sinon.stub(db.db, 'one').resolves(version); try { - await db.schemaCheck(false); + await db.initialize(false); assert.fail(noExpectedException); } catch (e) { assert(e instanceof DBErrors.MigrationNeeded); @@ -175,7 +175,7 @@ describe('DatabasePostgres', function () { const version = { major: 100, minor: 100, patch: 100 }; sinon.stub(db.db, 'one').resolves(version); try { - await db.schemaCheck(false); + await db.initialize(false); assert.fail(noExpectedException); } catch (e) { assert(e instanceof DBErrors.MigrationNeeded); @@ -186,9 +186,9 @@ describe('DatabasePostgres', function () { sinon.stub(db.db, 'multiResult'); sinon.stub(db, '_currentSchema').resolves(db.schemaVersionsSupported.max); sinon.stub(db.db, 'one').resolves(db.schemaVersionsSupported.max); - await db.schemaCheck(); + await db.initialize(); }); - }); // schemaCheck + }); // initialize describe('healthCheck', function () { beforeEach(function () {