mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-28 14:03:48 +03:00
Removed canary folder from regression tests
- we no longer have any concept of testing other versions than canary, therefore this folder doesn't mean anything
This commit is contained in:
parent
c9ca388a9f
commit
499f2e852e
@ -2,10 +2,10 @@ const {expect} = require('chai');
|
||||
const {any} = require('expect');
|
||||
const security = require('@tryghost/security');
|
||||
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const framework = require('../../../../utils/e2e-framework');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const settingsCache = require('../../../../../core/shared/settings-cache');
|
||||
const testUtils = require('../../../utils');
|
||||
const framework = require('../../../utils/e2e-framework');
|
||||
const models = require('../../../../core/server/models');
|
||||
const settingsCache = require('../../../../core/shared/settings-cache');
|
||||
|
||||
describe('Authentication API canary', function () {
|
||||
let agent;
|
@ -6,9 +6,9 @@ const uuid = require('uuid');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const events = require('../../../../../core/server/lib/common/events');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const events = require('../../../../core/server/lib/common/events');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
let request;
|
||||
@ -120,7 +120,7 @@ describe('DB API (canary)', function () {
|
||||
return request.post(localUtils.API.getApiQuery('db/'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('importfile', path.join(__dirname, '/../../../../utils/fixtures/csv/single-column-with-header.csv'))
|
||||
.attach('importfile', path.join(__dirname, '/../../../utils/fixtures/csv/single-column-with-header.csv'))
|
||||
.expect(415);
|
||||
});
|
||||
|
||||
@ -186,7 +186,7 @@ describe('DB API (canary)', function () {
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('importfile', path.join(__dirname, '/../../../../utils/fixtures/export/v2_export.json'))
|
||||
.attach('importfile', path.join(__dirname, '/../../../utils/fixtures/export/v2_export.json'))
|
||||
.expect(200);
|
||||
|
||||
const jsonResponse = res.body;
|
||||
@ -233,7 +233,7 @@ describe('DB API (canary)', function () {
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('importfile', path.join(__dirname, '/../../../../utils/fixtures/export/v3_export.json'))
|
||||
.attach('importfile', path.join(__dirname, '/../../../utils/fixtures/export/v3_export.json'))
|
||||
.expect(200);
|
||||
|
||||
const jsonResponse = res.body;
|
||||
@ -280,7 +280,7 @@ describe('DB API (canary)', function () {
|
||||
.set('Origin', config.get('url'))
|
||||
.set('Accept', 'application/json')
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('importfile', path.join(__dirname, '/../../../../utils/fixtures/export/v4_export.json'))
|
||||
.attach('importfile', path.join(__dirname, '/../../../utils/fixtures/export/v4_export.json'))
|
||||
.expect(200);
|
||||
|
||||
const jsonResponse = res.body;
|
@ -2,9 +2,9 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const jwt = require('jsonwebtoken');
|
||||
const jwksClient = require('jwks-rsa');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
let request;
|
||||
|
@ -3,8 +3,8 @@ const fs = require('fs-extra');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
describe('Images API', function () {
|
||||
const images = [];
|
||||
@ -35,7 +35,7 @@ describe('Images API', function () {
|
||||
request.post(localUtils.API.getApiQuery('images/upload'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('file', path.join(__dirname, '/../../../../utils/fixtures/csv/single-column-with-header.csv'))
|
||||
.attach('file', path.join(__dirname, '/../../../utils/fixtures/csv/single-column-with-header.csv'))
|
||||
.expect(415)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
@ -51,7 +51,7 @@ describe('Images API', function () {
|
||||
.set('Origin', config.get('url'))
|
||||
.set('content-type', 'image/png')
|
||||
.expect('Content-Type', /json/)
|
||||
.attach('file', path.join(__dirname, '/../../../../utils/fixtures/images/ghost-logo.pngx'))
|
||||
.attach('file', path.join(__dirname, '/../../../utils/fixtures/images/ghost-logo.pngx'))
|
||||
.expect(415)
|
||||
.end(function (err) {
|
||||
if (err) {
|
||||
@ -67,7 +67,7 @@ describe('Images API', function () {
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.field('purpose', 'profile_image')
|
||||
.attach('file', path.join(__dirname, '/../../../../utils/fixtures/images/favicon_not_square.png'))
|
||||
.attach('file', path.join(__dirname, '/../../../utils/fixtures/images/favicon_not_square.png'))
|
||||
.expect(422)
|
||||
.end(function (err) {
|
||||
if (err) {
|
@ -2,9 +2,9 @@ const path = require('path');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
let request;
|
||||
|
@ -3,11 +3,11 @@ const querystring = require('querystring');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const labs = require('../../../../../core/shared/labs');
|
||||
const mailService = require('../../../../../core/server/services/mail');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const labs = require('../../../../core/shared/labs');
|
||||
const mailService = require('../../../../core/server/services/mail');
|
||||
|
||||
let request;
|
||||
|
||||
@ -321,7 +321,7 @@ describe('Members API (canary)', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery(`members/upload/`))
|
||||
.field('labels', ['global-label-1', 'global-label-1'])
|
||||
.attach('membersfile', path.join(__dirname, '/../../../../utils/fixtures/csv/valid-members-labels.csv'))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../utils/fixtures/csv/valid-members-labels.csv'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
@ -387,7 +387,7 @@ describe('Members API (canary)', function () {
|
||||
.post(localUtils.API.getApiQuery(`members/upload/`))
|
||||
.field('mapping[correo_electrpnico]', 'email')
|
||||
.field('mapping[nombre]', 'name')
|
||||
.attach('membersfile', path.join(__dirname, '/../../../../utils/fixtures/csv/members-with-mappings.csv'))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../utils/fixtures/csv/members-with-mappings.csv'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
@ -437,7 +437,7 @@ describe('Members API (canary)', function () {
|
||||
it('Can import CSV with labels and provide additional labels', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery(`members/upload/`))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../../utils/fixtures/csv/valid-members-defaults.csv'))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../utils/fixtures/csv/valid-members-defaults.csv'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
@ -485,7 +485,7 @@ describe('Members API (canary)', function () {
|
||||
it('Runs imports with stripe_customer_id as background job', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery(`members/upload/`))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../../utils/fixtures/csv/members-with-stripe-ids.csv'))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../utils/fixtures/csv/members-with-stripe-ids.csv'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
||||
@ -504,7 +504,7 @@ describe('Members API (canary)', function () {
|
||||
return request
|
||||
.post(localUtils.API.getApiQuery(`members/upload/`))
|
||||
.field('labels', ['new-global-label'])
|
||||
.attach('membersfile', path.join(__dirname, '/../../../../utils/fixtures/csv/members-invalid-values.csv'))
|
||||
.attach('membersfile', path.join(__dirname, '/../../../utils/fixtures/csv/members-invalid-values.csv'))
|
||||
.set('Origin', config.get('url'))
|
||||
.expect('Content-Type', /json/)
|
||||
.expect('Cache-Control', testUtils.cacheRules.private)
|
@ -2,10 +2,10 @@ const path = require('path');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const labs = require('../../../../../core/shared/labs');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const labs = require('../../../../core/shared/labs');
|
||||
|
||||
let request;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
describe('Notifications API', function () {
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const localUtils = require('./utils');
|
||||
let request;
|
||||
|
@ -3,9 +3,9 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const moment = require('moment-timezone');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const models = require('../../../../../core/server/models');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const models = require('../../../../core/server/models');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
describe('Posts API (canary)', function () {
|
@ -4,9 +4,9 @@ const fs = require('fs-extra');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
const uuid = require('uuid');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
let request;
|
||||
|
@ -4,10 +4,10 @@ const supertest = require('supertest');
|
||||
const Promise = require('bluebird');
|
||||
const sinon = require('sinon');
|
||||
const moment = require('moment-timezone');
|
||||
const SchedulingDefault = require('../../../../../core/server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../../core/server/models/index');
|
||||
const config = require('../../../../../core/shared/config/index');
|
||||
const testUtils = require('../../../../utils/index');
|
||||
const SchedulingDefault = require('../../../../core/server/adapters/scheduling/SchedulingDefault');
|
||||
const models = require('../../../../core/server/models');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
describe('Canary Schedules API', function () {
|
@ -1,10 +1,10 @@
|
||||
const _ = require('lodash');
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const db = require('../../../../../core/server/data/db');
|
||||
const db = require('../../../../core/server/data/db');
|
||||
|
||||
// NOTE: in future iterations these fields should be fetched from a central module.
|
||||
// Have put a list as is here for the lack of better place for it.
|
@ -1,7 +1,7 @@
|
||||
const {expect} = require('chai');
|
||||
const {any, stringMatching} = require('expect');
|
||||
|
||||
const framework = require('../../../../utils/e2e-framework');
|
||||
const framework = require('../../../utils/e2e-framework');
|
||||
|
||||
describe('Config API', function () {
|
||||
let agent;
|
@ -1,10 +1,10 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const sinon = require('sinon');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const events = require('../../../../../core/server/lib/common/events');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const events = require('../../../../core/server/lib/common/events');
|
||||
|
||||
let request;
|
||||
|
@ -1,8 +1,8 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const ObjectId = require('bson-objectid');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const localUtils = require('./utils');
|
||||
let request;
|
||||
|
@ -1,5 +1,5 @@
|
||||
const url = require('url');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
|
||||
const API_URL = '/ghost/api/canary/admin/';
|
||||
|
@ -1,7 +1,7 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
const localUtils = require('./utils');
|
||||
|
||||
describe('Webhooks API (canary)', function () {
|
@ -1,9 +1,9 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const configUtils = require('../../../utils/configUtils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
describe('Authors Content API', function () {
|
||||
const validKey = localUtils.getValidKey();
|
@ -1,9 +1,9 @@
|
||||
const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const testUtils = require('../../../../utils');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const configUtils = require('../../../utils/configUtils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
let request;
|
||||
|
@ -3,12 +3,12 @@ const sinon = require('sinon');
|
||||
const moment = require('moment');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const labs = require('../../../../../core/shared/labs');
|
||||
const testUtils = require('../../../../utils');
|
||||
const labs = require('../../../../core/shared/labs');
|
||||
const testUtils = require('../../../utils');
|
||||
const localUtils = require('./utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const urlUtils = require('../../../../utils/urlUtils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const configUtils = require('../../../utils/configUtils');
|
||||
const urlUtils = require('../../../utils/urlUtils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
describe('api/canary/content/posts', function () {
|
||||
let request;
|
@ -2,9 +2,9 @@ const should = require('should');
|
||||
const supertest = require('supertest');
|
||||
const _ = require('lodash');
|
||||
const localUtils = require('./utils');
|
||||
const testUtils = require('../../../../utils');
|
||||
const configUtils = require('../../../../utils/configUtils');
|
||||
const config = require('../../../../../core/shared/config');
|
||||
const testUtils = require('../../../utils');
|
||||
const configUtils = require('../../../utils/configUtils');
|
||||
const config = require('../../../../core/shared/config');
|
||||
|
||||
let request;
|
||||
|
@ -1,7 +1,7 @@
|
||||
const url = require('url');
|
||||
const _ = require('lodash');
|
||||
const testUtils = require('../../../../utils');
|
||||
const schema = require('../../../../../core/server/data/schema').tables;
|
||||
const testUtils = require('../../../utils');
|
||||
const schema = require('../../../../core/server/data/schema').tables;
|
||||
const API_URL = '/ghost/api/canary/content/';
|
||||
|
||||
const expectedProperties = {
|
Loading…
Reference in New Issue
Block a user