-
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
[Reporting] Convert test code to Typescript #65155
Conversation
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
x-pack/test/reporting/api/usage.ts
Outdated
const esArchiver = getService('esArchiver'); | ||
const reportingAPI = getService('reportingAPI'); | ||
const usageAPI = getService('usageAPI'); | ||
const usageAPI = getService('usageAPI' as any); |
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.
Note: this service is mistakenly using /api/stats?extended
and returning the data in a different format where all the fields are snake_cased.
💚 Build SucceededHistory
To update your PR or re-run it, just comment with: |
} | ||
|
||
interface UsageStats { | ||
reporting: ReportingUsageStats; |
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'd like to use the ReportingUsageType
interface that is exposed in the Reporting plugin code. However, the structure returned by the service API endpoint is has some post-processing that converts all the field names to snake_case. It's a separate issue that requires cleanup.
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.
Filed an issue: #65338
Yet another PR to convert test code to Typescript. Since the PR is passing, I'm just going to merge with no reviewers since the changes are straightforward. The non-straightforward part is about why we can't use |
* convert tests to typescript * comment note * add type for api integration test * fix import
Summary
This PR converts the Reporting functional tests code (report generation, usage collection) to Typescript.