Skip to content

Commit

Permalink
[Spaces] Moved tests to agnostic setup (elastic#200606)
Browse files Browse the repository at this point in the history
## Summary

Moved space tests to deployment agnostic setup.


### Checklist

- [x] [Unit or functional
tests](https://www.elastic.co/guide/en/kibana/master/development-tests.html)
were updated or added to match the most common scenarios

__Closes: https://github.com/elastic/kibana/issues/194584__

---------

Co-authored-by: kibanamachine <[email protected]>
Co-authored-by: Elastic Machine <[email protected]>
  • Loading branch information
3 people authored Jan 23, 2025
1 parent 811c539 commit ac5366a
Show file tree
Hide file tree
Showing 60 changed files with 1,910 additions and 984 deletions.
2 changes: 0 additions & 2 deletions .buildkite/ftr_platform_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -343,9 +343,7 @@ enabled:
- x-pack/test/security_functional/expired_session.config.ts
- x-pack/test/session_view/basic/config.ts
- x-pack/test/spaces_api_integration/security_and_spaces/config_basic.ts
- x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_basic.ts
- x-pack/test/spaces_api_integration/security_and_spaces/config_trial.ts
- x-pack/test/spaces_api_integration/security_and_spaces/copy_to_space_config_trial.ts
- x-pack/test/spaces_api_integration/spaces_only/config.ts
- x-pack/test/task_manager_claimer_update_by_query/config.ts
- x-pack/test/ui_capabilities/security_and_spaces/config.ts
Expand Down
2 changes: 2 additions & 0 deletions .buildkite/ftr_security_serverless_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -126,3 +126,5 @@ enabled:
- x-pack/test/security_solution_endpoint/configs/serverless.integrations.config.ts
# serverless config files that run deployment-agnostic tests
- x-pack/test/api_integration/deployment_agnostic/configs/serverless/security.serverless.config.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/serverless.config.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/serverless.copy_to_space.config.ts
5 changes: 5 additions & 0 deletions .buildkite/ftr_security_stateful_configs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,3 +106,8 @@ enabled:
- x-pack/test/automatic_import_api_integration/apis/config_basic.ts
- x-pack/test/automatic_import_api_integration/apis/config_graphs.ts
- x-pack/test/security_solution_api_integration/test_suites/asset_inventory/entity_store/trial_license_complete_tier/configs/ess.config.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/spaces_only/config.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/stateful.config_basic.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/stateful.config_trial.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/stateful.copy_to_space.config_trial.ts
- x-pack/test/spaces_api_integration/deployment_agnostic/security_and_spaces/stateful.copy_to_space.config_basic.ts
1 change: 1 addition & 0 deletions packages/kbn-es/src/stateful_resources/roles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,4 @@ system_indices_superuser:
privileges: ['*']
resources: ['*']
run_as: ['*']

6 changes: 6 additions & 0 deletions src/dev/eslint/types.eslint.config.template.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -34,5 +34,11 @@ module.exports = {
'@typescript-eslint/no-floating-promises': 'error',
},
},
{
files: ['*spaces_api_integration/common/services/basic_auth_supertest.ts'],
rules: {
'@typescript-eslint/no-floating-promises': 'off',
},
},
],
};
4 changes: 4 additions & 0 deletions x-pack/test/spaces_api_integration/common/config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ import path from 'path';
import { REPO_ROOT } from '@kbn/repo-info';
import type { FtrConfigProviderContext } from '@kbn/test';

import { services } from './services';

interface CreateTestConfigOptions {
license: string;
disabledPlugins?: string[];
Expand Down Expand Up @@ -45,6 +47,8 @@ export function createTestConfig(name: string, options: CreateTestConfigOptions)
kibanaServer: config.kibana.functional.get('services.kibanaServer'),
spaces: config.xpack.api.get('services.spaces'),
usageAPI: config.xpack.api.get('services.usageAPI'),
roleScopedSupertest: services.roleScopedSupertest,
samlAuth: () => {},
},
junit: {
reportName: 'X-Pack Spaces API Integration Tests -- ' + name,
Expand Down
Loading

0 comments on commit ac5366a

Please sign in to comment.