Skip to content

Commit 1cc7ae1

Browse files
committed
[APM] Add API tests (#70740)
1 parent d970761 commit 1cc7ae1

File tree

16 files changed

+33568
-41
lines changed

16 files changed

+33568
-41
lines changed

x-pack/plugins/apm/server/routes/settings/agent_configuration.ts

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -136,15 +136,19 @@ export const createOrUpdateAgentConfigurationRoute = createRoute(() => ({
136136
},
137137
}));
138138

139+
const searchParamsRt = t.intersection([
140+
t.type({ service: serviceRt }),
141+
t.partial({ etag: t.string, mark_as_applied_by_agent: t.boolean }),
142+
]);
143+
144+
export type AgentConfigSearchParams = t.TypeOf<typeof searchParamsRt>;
145+
139146
// Lookup single configuration (used by APM Server)
140147
export const agentConfigurationSearchRoute = createRoute(() => ({
141148
method: 'POST',
142149
path: '/api/apm/settings/agent-configuration/search',
143150
params: {
144-
body: t.intersection([
145-
t.type({ service: serviceRt }),
146-
t.partial({ etag: t.string, mark_as_applied_by_agent: t.boolean }),
147-
]),
151+
body: searchParamsRt,
148152
},
149153
handler: async ({ context, request }) => {
150154
const {
Binary file not shown.

0 commit comments

Comments
 (0)