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

[ci] run server integration tests #81698

Merged

Conversation

spalger
Copy link
Contributor

@spalger spalger commented Oct 26, 2020

resubmission of #81427, which I closed because I accidentally marked it ready for review

In #81320 @restrry discovered that we aren't running the test/server_integration suite of tests on CI. This adds a step to execute these tests once the OSS version of Kibana is built.

Enabling these tests required fixing the KbnClient class to use certificate authorities correctly, which gave me the opportunity to improve the arguments to that class a little, but led to a few more changes than ideal. Hopefully the folks from @elastic/siem and @elastic/endpoint-management don't mind the way I've updated their uses of the KbnClient.

@spalger spalger force-pushed the implement/run-server-integration-tests-in-ci branch 6 times, most recently from 50ac6ea to 2a58bb2 Compare October 28, 2020 20:46
@spalger spalger force-pushed the implement/run-server-integration-tests-in-ci branch from 2a58bb2 to 8834218 Compare October 29, 2020 00:47
@spalger
Copy link
Contributor Author

spalger commented Nov 3, 2020

@elasticmachine merge upstream

@spalger
Copy link
Contributor Author

spalger commented Nov 3, 2020

@elasticmachine merge upstream

@spalger spalger added Team:Operations Team label for Operations Team v7.10.0 v7.11.0 v7.9.4 v8.0.0 release_note:skip Skip the PR/issue when compiling release notes labels Nov 3, 2020
@spalger spalger marked this pull request as ready for review November 3, 2020 15:05
@spalger spalger requested review from a team as code owners November 3, 2020 15:05
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-operations (Team:Operations)

@spalger
Copy link
Contributor Author

spalger commented Nov 3, 2020

@elasticmachine merge upstream

@kibanamachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

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

@jbudz
Copy link
Member

jbudz commented Nov 3, 2020

Do you have an example of the tests that are running now? I did a quick search for server in test results but the test count is +3 from a run a few hours ago. Does that sound right?

@spalger
Copy link
Contributor Author

spalger commented Nov 3, 2020

@jbudz When I look at https://kibana-ci.elastic.co/job/elastic+kibana+pipeline-pull-request/85587/testReport/ I see 54,085 tests (+136) at the top, the FTR configs which are running now can be found here: https://github.com/elastic/kibana/blob/master/tasks/config/run.js#L158-L178.

Looks like most tests are using the Http SSL Integration Tests report name, but one config uses the name Kibana Platform Http Integration Tests. With #81255 unique test files are created even when multiple configs use the same report name.

Copy link
Contributor

@paul-tavares paul-tavares left a comment

Choose a reason for hiding this comment

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

@spalger changes done in the Security Solution scripts look good to me. Thanks for the work done.

@parkiino FYI 😃

? matches[1] + matches[3].replace('/', '')
: kibanaUrl.replace('/', '');
const url = new URL(this.resolveUrl('/'));
url.username = '';
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice! 👍

`${this.kibanaUrlNoAuth}${path}`,
init as FetchRequestInit
) as unknown) as Promise<Response>;
requestWithApiKey(path: string, init?: RequestInit) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It would be great if KbnClient could also support what this method is doing it. I had found that there is no way to add custom set of headers to .request(), thus why we created this subclass. Our use case was for a utility that create "fake" agents in Fleet, whose APIs only accept API keys

Copy link
Contributor Author

@spalger spalger Nov 3, 2020

Choose a reason for hiding this comment

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

Yeah, definitely something we can add to the KbnClient class, mind logging an issue which outlines the desire and assign me? Simply being able to add headers or disable auth for a specific request seems like a pretty simple param change to the KbnClient but I'm not 100% sure.

@spalger spalger merged commit 0fec6cb into elastic:master Nov 3, 2020
@spalger spalger deleted the implement/run-server-integration-tests-in-ci branch November 3, 2020 22:50
spalger added a commit to spalger/kibana that referenced this pull request Nov 3, 2020
Co-authored-by: spalger <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
spalger added a commit to spalger/kibana that referenced this pull request Nov 3, 2020
Co-authored-by: spalger <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
spalger pushed a commit to spalger/kibana that referenced this pull request Nov 3, 2020
Co-authored-by: spalger <[email protected]>
Co-authored-by: Kibana Machine <[email protected]>
# Conflicts:
#	packages/kbn-dev-utils/src/index.ts
#	x-pack/plugins/security_solution/scripts/endpoint/kbn_client_with_api_key_support.ts
#	x-pack/plugins/security_solution/scripts/endpoint/resolver_generator_script.ts
#	x-pack/plugins/security_solution/scripts/endpoint/trusted_apps/index.ts
spalger added a commit that referenced this pull request Nov 4, 2020
spalger added a commit that referenced this pull request Nov 4, 2020
spalger added a commit that referenced this pull request Nov 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release_note:skip Skip the PR/issue when compiling release notes Team:Operations Team label for Operations Team v7.9.4 v7.10.0 v7.11.0 v8.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants