Skip to content

Commit

Permalink
skip tests by optionally using describe.skip
Browse files Browse the repository at this point in the history
  • Loading branch information
spalger committed Jun 18, 2020
1 parent 0230e32 commit 36b19aa
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions x-pack/test/epm_api_integration/apis/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,19 @@
import { FtrProviderContext } from '../../api_integration/ftr_provider_context';

export default function ({ loadTestFile, getService }: FtrProviderContext) {
describe('EPM Endpoints', function () {
this.tags('ciGroup7');
const dockerServers = getService('dockerServers');
const log = getService('log');

let maybeSkipped: typeof global.describe | typeof global.describe.skip = describe;

const dockerServers = getService('dockerServers');
const log = getService('log');
if (!dockerServers.isEnabled('registry')) {
log.warning('skipping EPM Endpoints tests because registry docker server is disabled');
return;
}
if (!dockerServers.isEnabled('registry')) {
log.warning('skipping EPM Endpoints tests because registry docker server is disabled');
maybeSkipped = describe.skip.bind(describe);
return;
}

maybeSkipped('EPM Endpoints', function () {
this.tags('ciGroup7');

loadTestFile(require.resolve('./list'));
// loadTestFile(require.resolve('./file'));
Expand Down

0 comments on commit 36b19aa

Please sign in to comment.