Skip to content

Commit

Permalink
[APM] Add API tests (#70740) (#71014)
Browse files Browse the repository at this point in the history
  • Loading branch information
sorenlouv authored Jul 8, 2020
1 parent 09a89e4 commit d15242b
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 d15242b

Please sign in to comment.