Skip to content

Commit

Permalink
Use archiveName variable
Browse files Browse the repository at this point in the history
  • Loading branch information
dgieselaar committed Sep 10, 2020
1 parent 033523e commit 3027310
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

const range = archives['apm_8.0.0'];
const archiveName = 'apm_8.0.0';
const range = archives[archiveName];
const start = encodeURIComponent(range.start);
const end = encodeURIComponent(range.end);

Expand All @@ -29,8 +30,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});

describe('when data is loaded', () => {
before(() => esArchiver.load('apm_8.0.0'));
after(() => esArchiver.unload('apm_8.0.0'));
before(() => esArchiver.load(archiveName));
after(() => esArchiver.unload(archiveName));

it('returns the agent name', async () => {
const response = await supertest.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

const archiveName = 'apm_8.0.0';

const range = archives_metadata['apm_8.0.0'];

// url parameters
Expand All @@ -35,8 +37,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {
});

describe('when data is loaded', () => {
before(() => esArchiver.load('apm_8.0.0'));
after(() => esArchiver.unload('apm_8.0.0'));
before(() => esArchiver.load(archiveName));
after(() => esArchiver.unload(archiveName));

it('returns a list of services', async () => {
const response = await supertest.get(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export default function ApiTest({ getService }: FtrProviderContext) {
const supertest = getService('supertest');
const esArchiver = getService('esArchiver');

const range = archives_metadata['apm_8.0.0'];
const archiveName = 'apm_8.0.0';

const range = archives_metadata[archiveName];

// url parameters
const start = encodeURIComponent(range.start);
Expand All @@ -25,8 +27,8 @@ export default function ApiTest({ getService }: FtrProviderContext) {

describe('APM Services Overview', () => {
describe('when data is loaded', () => {
before(() => esArchiver.load('apm_8.0.0'));
after(() => esArchiver.unload('apm_8.0.0'));
before(() => esArchiver.load(archiveName));
after(() => esArchiver.unload(archiveName));

it('returns a list of services with anomaly scores', async () => {
const response = await supertest.get(
Expand Down

0 comments on commit 3027310

Please sign in to comment.