Skip to content

Commit

Permalink
[APM] Add API tests (elastic#70740)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv committed Jul 7, 2020
1 parent d970761 commit 1cc7ae1
Show file tree
Hide file tree
Showing 16 changed files with 33,568 additions and 41 deletions.
12 changes: 8 additions & 4 deletions x-pack/plugins/apm/server/routes/settings/agent_configuration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -136,15 +136,19 @@ export const createOrUpdateAgentConfigurationRoute = createRoute(() => ({
},
}));

const searchParamsRt = t.intersection([
t.type({ service: serviceRt }),
t.partial({ etag: t.string, mark_as_applied_by_agent: t.boolean }),
]);

export type AgentConfigSearchParams = t.TypeOf<typeof searchParamsRt>;

// Lookup single configuration (used by APM Server)
export const agentConfigurationSearchRoute = createRoute(() => ({
method: 'POST',
path: '/api/apm/settings/agent-configuration/search',
params: {
body: t.intersection([
t.type({ service: serviceRt }),
t.partial({ etag: t.string, mark_as_applied_by_agent: t.boolean }),
]),
body: searchParamsRt,
},
handler: async ({ context, request }) => {
const {
Expand Down
Binary file not shown.
Loading

0 comments on commit 1cc7ae1

Please sign in to comment.