Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding API test for custom link transaction example #74238

Merged
merged 4 commits into from
Aug 14, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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');
cauemarcondes marked this conversation as resolved.
Show resolved Hide resolved
});
});
});
}