Skip to content
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

Adds api integration tests for core to serverless common #167570

Conversation

TinaHeiligers
Copy link
Contributor

Partially fix #167314

This PR adds serverless api_integration tests for core as a common test run for all project types.

The tests I added are modified duplicates of those in test/api_integration/apis/core that don't rely on custom configuration.

@TinaHeiligers TinaHeiligers added Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc backport:skip This commit does not require backporting ci:build-serverless-image v8.11.0 labels Sep 28, 2023
@TinaHeiligers TinaHeiligers marked this pull request as ready for review September 28, 2023 22:44
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-core (Team:Core)

@TinaHeiligers TinaHeiligers added the release_note:skip Skip the PR/issue when compiling release notes label Sep 29, 2023
@TinaHeiligers TinaHeiligers requested review from a team, davismcphee and lukeelmers and removed request for a team and davismcphee September 29, 2023 15:51
@TinaHeiligers
Copy link
Contributor Author

@lukeelmers I added you because I need help with adding custom config dependent tests!

@@ -24,6 +24,7 @@ export default async function ({ readConfigFile }: FtrConfigProviderContext) {
require.resolve('../../common/scripts_tests'),
require.resolve('../../common/search_oss'),
require.resolve('../../common/search_xpack'),
require.resolve('../../common/core'),
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The main index file was removed in favor of using common configs (#167172) to specify the common tests to run on each project.

Copy link
Contributor Author

@TinaHeiligers TinaHeiligers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self review

const supertest = getService('supertest');
const svlCommonApi = getService('svlCommonApi');
describe('/api/core/capabilities', () => {
it(`returns a 400 when an invalid app id is provided`, async () => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Test passed without custom config.

.then((response) => {
expect(response.header).to.have.property('content-encoding', 'gzip');
});
});
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The other tests we have in test/api_integration/core are either not applicable to serverless or will be added in a follow-up PR. I'll need to figure out how to add tests that use custom configs.

@kibana-ci
Copy link
Collaborator

kibana-ci commented Sep 29, 2023

💛 Build succeeded, but was flaky

  • Buildkite Build
  • Commit: 3baae61
  • Kibana Serverless Image: docker.elastic.co/kibana-ci/kibana-serverless:pr-167570-3baae6113256

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #8 / Serverless Common UI - Examples search examples Partial results example "before all" hook for "should update a progress bar"

Metrics [docs]

Canvas Sharable Runtime

The Canvas "shareable runtime" is an bundle produced to enable running Canvas workpads outside of Kibana. This bundle is included in third-party webpages that embed canvas and therefor should be as slim as possible.

id before after diff
module count - 5606 +5606
total size - 5.9MB +5.9MB

History

To update your PR or re-run it, just comment with:
@elasticmachine merge upstream

Copy link
Member

@afharo afharo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Remember to reopen the linked issue. It will be closed the moment we merge this one.

@TinaHeiligers TinaHeiligers merged commit 642ad7f into elastic:main Oct 2, 2023
@TinaHeiligers TinaHeiligers deleted the serverless-tests-core-api-integration branch October 2, 2023 16:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport:skip This commit does not require backporting ci:build-serverless-image release_note:skip Skip the PR/issue when compiling release notes Team:Core Core services & architecture: plugins, logging, config, saved objects, http, ES client, i18n, etc v8.11.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Copy/link existing FTR tests to test_serverless
4 participants