[Synthetics] Migrate maintenance-window API tests to Scout, drop redundant legacy FTR specs#272051
Draft
shahzad31 wants to merge 1 commit into
Draft
[Synthetics] Migrate maintenance-window API tests to Scout, drop redundant legacy FTR specs#272051shahzad31 wants to merge 1 commit into
shahzad31 wants to merge 1 commit into
Conversation
…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>
12 tasks
|
🤖 Jobs for this PR can be triggered through checkboxes. 🚧
ℹ️ To trigger the CI, please tick the checkbox below 👇
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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→ newplugins/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_windowspackage-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-policycomparePolicies, keeping it resilient to unrelated policy changes. It reuses the existingsyntheticsPrivateLocationsAPI service andaddMonitorhelper; the maintenance window is created viakbnClient(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)
synthetics_enablementsynthetics_enablement.spec.tsadd_monitor_projectcreate_monitor_project(incl. exact decrypt-after-hydration case)edit_monitor(only anit.skip, no active tests)edit_monitoradd_edit_paramscreate_update_delete_params(superset; all 12 titles present)Intentionally kept
sync_global_paramsis not deleted: its deployment-agnostic counterpart is currentlydescribe.skip, so removing the legacy spec would lose active coverage. It (and the remainingadd_monitor*,list_monitors,private_location_apis,sync_global_params*,synthetics_api_securityspecs) 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.ts→ 2 passednode scripts/type_check --project x-pack/solutions/observability/plugins/synthetics/tsconfig.jsonnode scripts/check.js --scope branch(lint ✓ / jest ✓ / tsc ✓)Made with Cursor