Skip to content

[Synthetics] Migrate maintenance-window API tests to Scout, drop redundant legacy FTR specs#272051

Draft
shahzad31 wants to merge 1 commit into
elastic:mainfrom
shahzad31:synthetics/mw-to-scout-drop-redundant-ftr
Draft

[Synthetics] Migrate maintenance-window API tests to Scout, drop redundant legacy FTR specs#272051
shahzad31 wants to merge 1 commit into
elastic:mainfrom
shahzad31:synthetics/mw-to-scout-drop-redundant-ftr

Conversation

@shahzad31
Copy link
Copy Markdown
Contributor

Summary

Continues the Actionable Observability FTR → Scout migration by thinning the legacy stateful synthetics FTR config (x-pack/solutions/observability/test/api_integration/apis/synthetics).

Migrated to Scout (unique coverage)

The two maintenance-window specs were the only coverage in this config with no deployment-agnostic counterpart, so they are migrated rather than deleted:

  • sync_maintenance_windows.ts + sync_maintenance_windows_non_default_space.ts → new plugins/synthetics/test/scout/api/tests/maintenance_windows.spec.ts (2 tests: default space + non-default space).

The new spec asserts directly on the synced maintenance_windows package-policy var (the actual integration point: a monitor referencing a maintenance window must sync that window into its backing Fleet package policy) instead of the FTR golden-policy comparePolicies, keeping it resilient to unrelated policy changes. It reuses the existing syntheticsPrivateLocations API service and addMonitor helper; the maintenance window is created via kbnClient (setup) and the monitor under test via a scoped admin API key.

This also adds serverless coverage (@local-serverless-observability_complete) that the stateful-only legacy config never had.

Deleted (coverage already exists elsewhere)

Legacy spec Already covered by
synthetics_enablement Scout synthetics_enablement.spec.ts
add_monitor_project deployment-agnostic create_monitor_project (incl. exact decrypt-after-hydration case)
edit_monitor (only an it.skip, no active tests) deployment-agnostic edit_monitor
add_edit_params deployment-agnostic create_update_delete_params (superset; all 12 titles present)

Intentionally kept

  • sync_global_params is not deleted: its deployment-agnostic counterpart is currently describe.skip, so removing the legacy spec would lose active coverage. It (and the remaining add_monitor*, list_monitors, private_location_apis, sync_global_params*, synthetics_api_security specs) stay until they have live replacements, so the legacy config and its CI manifest entry remain for now.

Test plan

  • node scripts/scout.js run-tests --arch stateful --domain classic --testFiles .../maintenance_windows.spec.ts2 passed
  • node scripts/type_check --project x-pack/solutions/observability/plugins/synthetics/tsconfig.json
  • node scripts/check.js --scope branch (lint ✓ / jest ✓ / tsc ✓)
  • CI green (incl. serverless target for the new spec)

Made with Cursor

…ndant legacy FTR specs

Thins the legacy stateful synthetics FTR config
(`test/api_integration/apis/synthetics`):

- Migrate `sync_maintenance_windows` + `sync_maintenance_windows_non_default_space`
  to a new Scout API spec (`maintenance_windows.spec.ts`). These were the only
  unique coverage (no deployment-agnostic counterpart). Instead of the FTR
  golden-policy `comparePolicies`, the Scout spec asserts directly on the
  synced `maintenance_windows` package-policy var.
- Delete 4 specs whose coverage already exists elsewhere:
  - `synthetics_enablement` -> Scout `synthetics_enablement.spec.ts`
  - `add_monitor_project` -> deployment-agnostic `create_monitor_project`
  - `edit_monitor` (only an `it.skip`) -> deployment-agnostic `edit_monitor`
  - `add_edit_params` -> deployment-agnostic `create_update_delete_params`

`sync_global_params` is intentionally kept: its deployment-agnostic counterpart
is currently `describe.skip`, so deleting it would lose active coverage.

Co-authored-by: Cursor <cursoragent@cursor.com>
@shahzad31 shahzad31 added release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics. labels May 31, 2026
@github-actions github-actions Bot added the author:actionable-obs PRs authored by the actionable obs team label May 31, 2026
@infra-vault-gh-plugin-prod
Copy link
Copy Markdown

🤖 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!
  • Click to trigger kibana-deploy-cloud-from-pr for this PR!
  • Click to trigger kibana-entity-store-performance-from-pr for this PR!
  • Click to trigger kibana-storybooks-from-pr for this PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author:actionable-obs PRs authored by the actionable obs team backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:actionable-obs Formerly "obs-ux-management", responsible for SLO, o11y alerting, significant events, & synthetics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant