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

[Spaces] Moved tests to agnostic setup #200606

Draft
wants to merge 30 commits into
base: main
Choose a base branch
from

Conversation

elena-shostak
Copy link
Contributor

@elena-shostak elena-shostak commented Nov 18, 2024

Summary

Summarize your PR. If it involves visual changes include a screenshot or gif.

Checklist

@elasticmachine
Copy link
Contributor

elasticmachine commented Nov 18, 2024

🤖 Jobs for this PR can be triggered through checkboxes. 🚧

ℹ️ To trigger the CI, please tick the checkbox below 👇

  • Click to trigger kibana-pull-request for this PR!
  • Click to trigger kibana-deploy-project-from-pr for this PR!

@elena-shostak
Copy link
Contributor Author

/ci

9 similar comments
@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak elena-shostak changed the title Moved tests to agnostic setup [Spaces] Moved tests to agnostic setup Nov 19, 2024
@elena-shostak elena-shostak added Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more! Feature:Security/Spaces Platform Security - Spaces feature FTR release_note:skip Skip the PR/issue when compiling release notes labels Nov 19, 2024
@elena-shostak elena-shostak force-pushed the space-deployment-agnostic branch from 8fedf64 to f6def7f Compare November 19, 2024 14:11
@elena-shostak
Copy link
Contributor Author

/ci

@azasypkin azasypkin self-requested a review November 19, 2024 16:02
@elena-shostak elena-shostak force-pushed the space-deployment-agnostic branch 2 times, most recently from 2df08a0 to 1464f66 Compare December 27, 2024 12:55
@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7634

[❌] x-pack/test/spaces_api_integration/deployment_agnostic/stateful.config_trial.ts: 0/10 tests passed.

see run history

@kibanamachine
Copy link
Contributor

Flaky Test Runner Stats

🟠 Some tests failed. - kibana-flaky-test-suite-runner#7635

[❌] x-pack/test/spaces_api_integration/deployment_agnostic/stateful.config_trial.ts: 0/1 tests passed.
[❌] x-pack/test/spaces_api_integration/deployment_agnostic/stateful.copy_to_space.config_basic.ts: 0/1 tests passed.
[❌] x-pack/test/spaces_api_integration/deployment_agnostic/stateful.copy_to_space.config_trial.ts: 0/1 tests passed.
[❌] x-pack/test/spaces_api_integration/deployment_agnostic/spaces_only/config.ts: 0/1 tests passed.
[❌] x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts: 0/1 tests passed.
[❌] x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts: 0/1 tests passed.

see run history

@elena-shostak
Copy link
Contributor Author

/ci

@elena-shostak
Copy link
Contributor Author

/сi

@elena-shostak elena-shostak force-pushed the space-deployment-agnostic branch from efed4f7 to 585fcec Compare December 30, 2024 13:25
@elena-shostak elena-shostak force-pushed the space-deployment-agnostic branch from 06a8199 to e82dcfe Compare January 3, 2025 11:21
) {
const license = config.get('esTestCluster.license');

if (!user || license !== 'trial') {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Important

We have a shared test suite for basic/trial licenses, which includes tests for both authorized and unauthorized users. Decoupling these tests is a complex and time-consuming task that requires careful consideration to avoid ending up with a significant amount of duplicated test code for different licenses.

Our custom service for RoleScopedSupertest takes it into account license and user passed/not passed to adjust needed supertest accordingly.

@@ -139,7 +139,7 @@
"id": "conflict_2_default",
"originId": "conflict_2",
"references": [],
"type": "sharedtype",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Note

sharedtype changed to event-annotation-group SO
isolatedtype changed to url SO

I failed to change sharedtype to index-pattern SO type since I was getting a lot of missing references errors, probably it was due to the fact that index-pattern was migrated to the multiple namespace from 8.0.0

@@ -34,5 +34,11 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'error',
},
},
{
files: ['*spaces_api_integration/common/services/basic_auth_supertest.ts'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

agent.auth(this.user.username!, this.user.password!);

Needed to suppress the eslint error for this line in out custom test service, the promise is awaited in the tests itself and adding a catch block breaks some of the test cases

@elasticmachine
Copy link
Contributor

elasticmachine commented Jan 3, 2025

💔 Build Failed

Failed CI Steps

Test Failures

  • [job] [logs] x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/serverless.config.ts / spaces api with security create user with no access from the default space @skipInServerless when solution is specified should return 403
  • [job] [logs] x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/serverless.config.ts / spaces api with security create user with no access from the default space @skipInServerless when solution is specified should return 403

Metrics [docs]

Unknown metric groups

ESLint disabled line counts

id before after diff
@kbn/test-suites-xpack 730 713 -17

Total ESLint disabled count

id before after diff
@kbn/test-suites-xpack 755 738 -17

History

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Spaces Platform Security - Spaces feature FTR release_note:skip Skip the PR/issue when compiling release notes Team:Security Team focused on: Auth, Users, Roles, Spaces, Audit Logging, and more!
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants