Skip to content

[scout] migrate FTR serverless API management tests#262124

Merged
dmlemeshko merged 16 commits intoelastic:mainfrom
dmlemeshko:scout/migrate-svl-api-management-tests
Apr 15, 2026
Merged

[scout] migrate FTR serverless API management tests#262124
dmlemeshko merged 16 commits intoelastic:mainfrom
dmlemeshko:scout/migrate-svl-api-management-tests

Conversation

@dmlemeshko
Copy link
Copy Markdown
Contributor

@dmlemeshko dmlemeshko commented Apr 8, 2026

Summary

Closes https://github.com/elastic/appex-qa-team/issues/849

This PR migrates FTR API tests from x-pack/platform/test/serverless/api_integration/test_suites/management/

  • rollups.ts
  • scripted_fields.ts
  • spaces.ts

to Scout API tests across two plugins:

  • src/platform/plugins/shared/data_views/test/scout/api/tests/

    • rollup_data_views.spec.ts
    • scripted_fields_disabled.spec.ts
  • x-pack/platform/plugins/shared/spaces/test/scout/api/tests/

    • crud.spec.ts
    • active_space.spec.ts (tags broadened to deploymentAgnostic; stateful FTR counterpart x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts removed)
    • route_access.spec.ts

@dmlemeshko dmlemeshko added release_note:skip Skip the PR/issue when compiling release notes backport:version Backport to applied version labels v9.4.0 v9.3.4 labels Apr 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Apr 9, 2026

Caution

Review failed

An error occurred during the review process. Please try again later.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • 🛠️ Update Documentation: Commit on current branch
  • 🛠️ Update Documentation: Create PR

Comment @coderabbitai help to get the list of available commands and usage tips.

@dmlemeshko dmlemeshko marked this pull request as ready for review April 9, 2026 13:41
@dmlemeshko dmlemeshko requested review from a team as code owners April 9, 2026 13:41
@dmlemeshko dmlemeshko requested a review from jeramysoucy April 9, 2026 13:41
Comment on lines +60 to +65
/** Matches a string that contains the expected substring */
stringContaining: (expected: string) =>
createAsymmetricMatcher(
(actual) => typeof actual === 'string' && actual.includes(expected),
`stringContaining(${JSON.stringify(expected)})`
),
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

it was used by one of the migrated tests, seems to be reasonable addition

Comment on lines +119 to +134
apiTest(
'should not allow us to update a space with disabled features',
async ({ apiClient }) => {
const response = await apiClient.put('api/spaces/space/space_to_update', {
headers: { ...COMMON_HEADERS, ...adminApiCredentials.apiKeyHeader },
body: {
id: 'space_to_update',
name: 'some new name',
initials: 'SN',
disabledFeatures: ['discover'],
},
});

expect(response).toHaveStatusCode(400);
}
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This one doesnt create space_to_update itself. It relies on the preceding should allow us to update a space test having created it. If that test fails or is skipped, this one will break with a misleading error (exp 404 not found)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

updated, good catch

@dmlemeshko dmlemeshko requested a review from steliosmavro April 9, 2026 14:51
@dmlemeshko dmlemeshko enabled auto-merge (squash) April 9, 2026 15:55
Copy link
Copy Markdown
Contributor

@davismcphee davismcphee left a comment

Choose a reason for hiding this comment

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

Data Discover changes LGTM 👍

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Could we put the new tests in the data_views subfolder? Seems like that would match what we've been doing so far.

Copy link
Copy Markdown
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Sorry for the delay! LGTM, but can we improve the file names on serverless-specific tests? E.g.

  • serverless_crud.spec.ts
  • serverless_route_access.spec.ts

Comment on lines +15 to +18
/**
* Serverless-specific spaces CRUD tests.
* Feature visibility cannot be set in serverless — the create/update tests
* verifying that disabledFeatures is rejected are unique to serverless.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: the path/name of the file does not easily identify this as a serverless-specific test suite.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

fixed in 59f01ab

Comment on lines +19 to +22
...tags.serverless.observability.complete,
...tags.serverless.search,
...tags.serverless.security.complete,
],
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Nit: same as above. Would it make sense to put serverless-specific tests in their own folder, or to add a name prefix?

@dmlemeshko dmlemeshko requested a review from jeramysoucy April 14, 2026 13:42
@elasticmachine
Copy link
Copy Markdown
Contributor

💛 Build succeeded, but was flaky

Failed CI Steps

Test Failures

  • [job] [logs] FTR Configs #169 / console app console autocomplete feature ESQL queries does not suggest ESQL when inside non-query triple quotes

Metrics [docs]

✅ unchanged

History

Copy link
Copy Markdown
Contributor

@jeramysoucy jeramysoucy left a comment

Choose a reason for hiding this comment

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

Thanks!

@dmlemeshko dmlemeshko merged commit d83040b into elastic:main Apr 15, 2026
17 checks passed
@kibanamachine
Copy link
Copy Markdown
Contributor

Starting backport for target branches: 9.3, 9.4

https://github.com/elastic/kibana/actions/runs/24442055845

kibanamachine pushed a commit to kibanamachine/kibana that referenced this pull request Apr 15, 2026
## Summary

This PR migrates FTR API tests from
`x-pack/platform/test/serverless/api_integration/test_suites/management/`

- rollups.ts
- scripted_fields.ts
- spaces.ts

to Scout API tests across two plugins:

- `src/platform/plugins/shared/data_views/test/scout/api/tests/`
  - rollup_data_views.spec.ts
  - scripted_fields_disabled.spec.ts

- `x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`
  - crud.spec.ts
- active_space.spec.ts (tags broadened to `deploymentAgnostic`; stateful
FTR counterpart
`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`
removed)
  - route_access.spec.ts

(cherry picked from commit d83040b)
@kibanamachine
Copy link
Copy Markdown
Contributor

💔 Some backports could not be created

Status Branch Result
9.3 Backport failed because of merge conflicts

You might need to backport the following PRs to 9.3:
- [Fleet] Fix screen reader announcement for actions buttons across Fleet tables (#258559)
- [APM] Align serverless APM service nav with stateful (#263119)
- Fix @elastic/eui/require-aria-label-for-modals lint violations in osquery plugin (#263060)
- Remove remaining Trace Explorer implementation (#262265)
- [Typed React Router Config] Implement self-healing mechanism for malformed urls (#257245)
9.4

Note: Successful backport PRs will be merged automatically after passing CI.

Manual backport

To create the backport manually run:

node scripts/backport --pr 262124

Questions ?

Please refer to the Backport tool documentation

dmlemeshko added a commit to dmlemeshko/kibana that referenced this pull request Apr 15, 2026
## Summary

This PR migrates FTR API tests from
`x-pack/platform/test/serverless/api_integration/test_suites/management/`

- rollups.ts
- scripted_fields.ts
- spaces.ts

to Scout API tests across two plugins:

- `src/platform/plugins/shared/data_views/test/scout/api/tests/`
  - rollup_data_views.spec.ts
  - scripted_fields_disabled.spec.ts

- `x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`
  - crud.spec.ts
- active_space.spec.ts (tags broadened to `deploymentAgnostic`; stateful
FTR counterpart
`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`
removed)
  - route_access.spec.ts

(cherry picked from commit d83040b)

# Conflicts:
#	x-pack/platform/test/serverless/api_integration/test_suites/management/spaces.ts
@dmlemeshko
Copy link
Copy Markdown
Contributor Author

💚 All backports created successfully

Status Branch Result
9.3

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

kibanamachine added a commit that referenced this pull request Apr 15, 2026
…263291)

# Backport

This will backport the following commits from `main` to `9.4`:
- [[scout] migrate FTR serverless API management tests
(#262124)](#262124)

<!--- Backport version: 9.6.6 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-04-15T07:29:18Z","message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","v9.5.0","v9.3.4"],"title":"[scout]
migrate FTR serverless API management
tests","number":262124,"url":"https://github.com/elastic/kibana/pull/262124","mergeCommit":{"message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8"}},"sourceBranch":"main","suggestedTargetBranches":["9.4","9.3"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262124","number":262124,"mergeCommit":{"message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->

Co-authored-by: Dzmitry Lemechko <dzmitry.lemechko@elastic.co>
dmlemeshko added a commit that referenced this pull request Apr 15, 2026
…263299)

# Backport

This will backport the following commits from `main` to `9.3`:
- [[scout] migrate FTR serverless API management tests
(#262124)](#262124)

<!--- Backport version: 11.0.1 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Dzmitry
Lemechko","email":"dzmitry.lemechko@elastic.co"},"sourceCommit":{"committedDate":"2026-04-15T07:29:18Z","message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8","branchLabelMapping":{"^v9.5.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:version","v9.4.0","v9.5.0","v9.3.4"],"title":"[scout]
migrate FTR serverless API management
tests","number":262124,"url":"https://github.com/elastic/kibana/pull/262124","mergeCommit":{"message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8"}},"sourceBranch":"main","suggestedTargetBranches":["9.3"],"targetPullRequestStates":[{"branch":"9.4","label":"v9.4.0","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"url":"https://github.com/elastic/kibana/pull/263291","number":263291,"state":"OPEN"},{"branch":"main","label":"v9.5.0","branchLabelMappingKey":"^v9.5.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/262124","number":262124,"mergeCommit":{"message":"[scout]
migrate FTR serverless API management tests (#262124)\n\n##
Summary\n\nThis PR migrates FTR API tests
from\n`x-pack/platform/test/serverless/api_integration/test_suites/management/`\n\n-
rollups.ts\n- scripted_fields.ts\n- spaces.ts\n\nto Scout API tests
across two plugins:\n\n-
`src/platform/plugins/shared/data_views/test/scout/api/tests/`\n -
rollup_data_views.spec.ts\n - scripted_fields_disabled.spec.ts\n\n-
`x-pack/platform/plugins/shared/spaces/test/scout/api/tests/`\n -
crud.spec.ts\n- active_space.spec.ts (tags broadened to
`deploymentAgnostic`; stateful\nFTR
counterpart\n`x-pack/platform/test/api_integration/apis/spaces/get_active_space.ts`\nremoved)\n
-
route_access.spec.ts","sha":"d83040b6ec743859edf2ebe974e6d71ac2bae5b8"}},{"branch":"9.3","label":"v9.3.4","branchLabelMappingKey":"^v(\\d+).(\\d+).\\d+$","isSourceBranch":false,"state":"NOT_CREATED"}]}]
BACKPORT-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:version Backport to applied version labels release_note:skip Skip the PR/issue when compiling release notes v9.3.4 v9.4.0 v9.5.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants