Skip to content

Commit

Permalink
Adding API test for custom link transaction example (#74238) (#75024)
Browse files Browse the repository at this point in the history
* Adding api test for custom link transaction example

* expecting specific fields

* expecting specific fields

Co-authored-by: Elastic Machine <[email protected]>

Co-authored-by: Cauê Marcondes <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
3 people authored Aug 14, 2020
1 parent 54024de commit 3668f41
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export default function customLinksTests({ getService }: FtrProviderContext) {
const supertestRead = getService('supertestAsApmReadUser');
const supertestWrite = getService('supertestAsApmWriteUser');
const log = getService('log');
const esArchiver = getService('esArchiver');

function searchCustomLinks(filters?: any) {
const path = URL.format({
Expand Down Expand Up @@ -139,5 +140,18 @@ export default function customLinksTests({ getService }: FtrProviderContext) {
expect(status).to.equal(200);
expect(body).to.eql([]);
});

describe('transaction', () => {
before(() => esArchiver.load('8.0.0'));
after(() => esArchiver.unload('8.0.0'));

it('fetches a transaction sample', async () => {
const response = await supertestRead.get(
'/api/apm/settings/custom_links/transaction?service.name=opbeans-java'
);
expect(response.status).to.be(200);
expect(response.body.service.name).to.eql('opbeans-java');
});
});
});
}

0 comments on commit 3668f41

Please sign in to comment.