feat(proxy-server): add local fs middleware and make it the default (#3217)

This commit is contained in:
Erez Rokah
2020-02-10 18:07:52 +02:00
committed by GitHub
parent 97bc0c8dc4
commit 31dbd72273
14 changed files with 523 additions and 131 deletions

View File

@ -3,12 +3,13 @@ import * as specUtils from './common/spec_utils';
import { entry1, entry2, entry3 } from './common/entries';
const backend = 'proxy';
const mode = 'git';
describe.skip('Proxy Backend Editorial Workflow', () => {
describe.skip(`Proxy Backend Editorial Workflow - '${mode}' mode`, () => {
let taskResult = { data: {} };
before(() => {
specUtils.before(taskResult, { publish_mode: 'editorial_workflow' }, backend);
specUtils.before(taskResult, { publish_mode: 'editorial_workflow', mode }, backend);
Cypress.config('defaultCommandTimeout', 5 * 1000);
});

View File

@ -3,12 +3,13 @@ import * as specUtils from './common/spec_utils';
import { entry1 } from './common/entries';
const backend = 'proxy';
const mode = 'git';
describe('Proxy Backend Media Library - REST API', () => {
describe(`Proxy Backend Media Library - '${mode}' mode`, () => {
let taskResult = { data: {} };
before(() => {
specUtils.before(taskResult, { publish_mode: 'editorial_workflow' }, backend);
specUtils.before(taskResult, { publish_mode: 'editorial_workflow', mode }, backend);
Cypress.config('defaultCommandTimeout', 5 * 1000);
});

View File

@ -3,12 +3,13 @@ import * as specUtils from './common/spec_utils';
import { entry1, entry2, entry3 } from './common/entries';
const backend = 'proxy';
const mode = 'fs';
describe('Proxy Backend Simple Workflow', () => {
describe(`Proxy Backend Simple Workflow - '${mode}' mode`, () => {
let taskResult = { data: {} };
before(() => {
specUtils.before(taskResult, { publish_mode: 'simple' }, backend);
specUtils.before(taskResult, { publish_mode: 'simple', mode }, backend);
Cypress.config('defaultCommandTimeout', 5 * 1000);
});

View File

@ -0,0 +1,32 @@
import fixture from './common/simple_workflow';
import * as specUtils from './common/spec_utils';
import { entry1, entry2, entry3 } from './common/entries';
const backend = 'proxy';
const mode = 'git';
describe(`Proxy Backend Simple Workflow - '${mode}' mode`, () => {
let taskResult = { data: {} };
before(() => {
specUtils.before(taskResult, { publish_mode: 'simple', mode }, backend);
Cypress.config('defaultCommandTimeout', 5 * 1000);
});
after(() => {
specUtils.after(taskResult, backend);
});
beforeEach(() => {
specUtils.beforeEach(taskResult, backend);
});
afterEach(() => {
specUtils.afterEach(taskResult, backend);
});
fixture({
entries: [entry1, entry2, entry3],
getUser: () => taskResult.data.user,
});
});