Skip to content

Commit

Permalink
skip afterEach if server doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
neptunian committed Oct 15, 2020
1 parent f60d327 commit 267c67e
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ export default function (providerContext: FtrProviderContext) {
const { getService } = providerContext;
const supertest = getService('supertest');
const es = getService('es');
const dockerServers = getService('dockerServers');
const server = dockerServers.get('registry');
const pkgName = 'datastreams';
const pkgVersion = '0.1.0';
const pkgUpdateVersion = '0.2.0';
Expand Down Expand Up @@ -63,6 +65,7 @@ export default function (providerContext: FtrProviderContext) {
});
});
afterEach(async () => {
if (!server) return;
await es.transport.request({
method: 'DELETE',
path: `/_data_stream/${logsTemplateName}-default`,
Expand Down

0 comments on commit 267c67e

Please sign in to comment.