-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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
[APM] Add API tests #70740
[APM] Add API tests #70740
Conversation
Pinging @elastic/apm-ui (Team:apm) |
x-pack/plugins/apm/server/lib/services/get_services/get_services_items.ts
Outdated
Show resolved
Hide resolved
retest |
25523a2
to
6b54778
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had a few nits but this looks great and works for me.
I like to use this site for guidelines about how to write good tests, even though it's RSpec-specific. Not using "should" makes the output read better: http://www.betterspecs.org/#should
x-pack/test/apm_api_integration/basic/tests/services/top_services.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/top_services.ts
Outdated
Show resolved
Hide resolved
`/api/apm/services?start=${start}&end=${end}&uiFilters=${uiFilters}` | ||
); | ||
// sort services to mitigate unstable sort order | ||
const services = sortBy(response.body.items, ['serviceName']); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is it a bug in the API that we don't have a stable sort order? No need to change here, but maybe we should open a ticket.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
x-pack/test/apm_api_integration/basic/tests/services/transactions/agent_name.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/agent_name.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/top_transaction_groups.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/top_transaction_groups.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/top_transaction_groups.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/transaction_charts.ts
Outdated
Show resolved
Hide resolved
x-pack/test/apm_api_integration/basic/tests/services/transactions/transaction_charts.ts
Outdated
Show resolved
Hide resolved
t.partial({ etag: t.string, mark_as_applied_by_agent: t.boolean }), | ||
]); | ||
|
||
export type AgentConfigSearchParams = t.TypeOf<typeof searchParamsRt>; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@dgieselaar would it be better to have a helper that infers the params from a route? Like:
type AgentConfigSearchParams = RouteParams<typeof agentConfigurationSearchRoute>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, you can possibly extract such a helper from the typings we have today. I'm thinking about making params
a io-ts
type as well (rather than a record of io-ts
types), and then it will be even easier.
retest |
9b8456e
to
95d684f
Compare
💚 Build SucceededBuild metrics
History
To update your PR or re-run it, just comment with: |
* master: (36 commits) fixed api url in example plugin (elastic#70934) [data.search.aggs]: Remove remaining client dependencies (elastic#70251) [Security Solution][Endpoint] Fix base64 download bug and adopt new user artifact/manifest format (elastic#70998) [Security Solution][Exceptions] - Exception Modal Part I (elastic#70639) [SIEM][Detection Engine][Lists] Adds additional data types to value based lists [SIEM][Detection Engine][Lists] Removes feature flag for lists [APM] Show license callout in ML settings (elastic#70959) Migrate service settings test to jest (elastic#70992) [APM] Add cloud attributes to data telemetry (elastic#71008) Fix breadcrumb on panels for visibility / round corners (elastic#71010) Improve search typescript (elastic#69333) [savedObjects field count] run in baseline job (elastic#70999) [Security Solution] [Timeline] Timeline manager tweaks (elastic#69988) [Endpoint] Support redirect from Policy Details to Ingest when user initiates Edit Policy from Datasource Edit page (elastic#70874) [APM] Add API tests (elastic#70740) [Security Solution][Exceptions] - Tie server and client code together (elastic#70918) [Audit Logging] Add AuditTrail service (elastic#69278) [Usage Collection] Ensure no type duplicates (elastic#70946) [Security Solution] [Timeline] Bugfix for timeline row actions disappear sometimes (elastic#70958) [CI] Add pipeline task queue framework and merge workers into one (elastic#64011) ...
Related: #70739