diff --git a/.buildkite/scout_ci_config.yml b/.buildkite/scout_ci_config.yml index 48140f8e172e2..815c62a9c3ec4 100644 --- a/.buildkite/scout_ci_config.yml +++ b/.buildkite/scout_ci_config.yml @@ -29,12 +29,9 @@ plugins: packages: enabled: + - kbn-scout - kbn-streamlang-tests disabled: - # Scout's own tests are executed first to validate the Scout framework - # (see .buildkite/scripts/steps/test/scout/test_run_builder.sh). Excluded here - # so they don't rerun alongside plugin/package Scout tests discovered later. - - kbn-scout - kbn-scout-release-testing # Release tests will run separately as part of the release process # Define test configs to be excluded from automatic discovery & execution in CI environment (process.env.CI=true) diff --git a/.buildkite/scripts/steps/test/scout/test_run_builder.sh b/.buildkite/scripts/steps/test/scout/test_run_builder.sh index 8555d9c8e28d0..1a5ea44d9b497 100755 --- a/.buildkite/scripts/steps/test/scout/test_run_builder.sh +++ b/.buildkite/scripts/steps/test/scout/test_run_builder.sh @@ -80,7 +80,8 @@ else SELECTIVE_SCOUT_DISCOVERY_FLAG=(--selective-testing) echo "Selective testing: enabled (--selective-testing flag will be passed to discover-playwright-configs)" else - echo "Selective testing: disabled — reason: SELECTIVE_TESTING_ENABLED=${SELECTIVE_TESTING_ENABLED:-false}, scout:run-all-tests label=$(is_pr_with_label "scout:run-all-tests" && echo yes || echo no), critical files touched=${SCOUT_CRITICAL_FILES_TOUCHED}" + echo "Selective testing is disabled" + echo "Reason: SELECTIVE_TESTING_ENABLED=${SELECTIVE_TESTING_ENABLED:-false}, 'scout:run-all-tests' label=$(is_pr_with_label "scout:run-all-tests" && echo yes || echo no), 'critical files touched'=${SCOUT_CRITICAL_FILES_TOUCHED}" fi node scripts/scout discover-playwright-configs \ --include-custom-servers \ @@ -92,13 +93,6 @@ else buildkite-agent artifact upload "scout_playwright_configs.json" fi -echo '--- Running Scout API Integration Tests (against Kibana source code)' -node scripts/scout.js run-tests \ - --location local \ - --arch stateful \ - --domain classic \ - --config src/platform/packages/shared/kbn-scout/test/scout/api/parallel.playwright.config.ts \ - source .buildkite/scripts/steps/test/scout/upload_report_events.sh echo '--- Producing Scout Test Execution Steps' diff --git a/src/platform/packages/shared/kbn-scout/test/scout/api/parallel_tests/api_services/fleet.spec.ts b/src/platform/packages/shared/kbn-scout/test/scout/api/parallel_tests/api_services/fleet.spec.ts index 80573f0d17c9b..8e0787c151d37 100644 --- a/src/platform/packages/shared/kbn-scout/test/scout/api/parallel_tests/api_services/fleet.spec.ts +++ b/src/platform/packages/shared/kbn-scout/test/scout/api/parallel_tests/api_services/fleet.spec.ts @@ -172,82 +172,78 @@ apiTest.describe( } ); -apiTest.describe( - 'Fleet Outputs Management', - { tag: [...tags.serverless.security.complete, ...tags.stateful.classic] }, - () => { - let outputId: string; - - apiTest.afterEach(async ({ apiServices }) => { - // Clean up output - if (outputId) { - await apiServices.fleet.outputs.delete(outputId); +apiTest.describe('Fleet Outputs Management', { tag: [...tags.stateful.classic] }, () => { + let outputId: string; + + apiTest.afterEach(async ({ apiServices }) => { + // Clean up output + if (outputId) { + await apiServices.fleet.outputs.delete(outputId); + } + outputId = ''; + }); + + apiTest('should get all outputs', async ({ apiServices }) => { + const response = await apiServices.fleet.outputs.getOutputs(); + + expect(response).toHaveStatusCode(200); + expect(response.data).toBeDefined(); + expect(response.data.items).toBeDefined(); + }); + + apiTest('should get a specific output by ID', async ({ apiServices }) => { + // First get all outputs to find an existing one + const allOutputsResponse = await apiServices.fleet.outputs.getOutputs(); + const existingOutput = allOutputsResponse.data.items[0]; + + // Only proceed if we have an existing output + expect(existingOutput).toBeDefined(); + + const response = await apiServices.fleet.outputs.getOutput(existingOutput.id); + + expect(response).toHaveStatusCode(200); + expect(response.data.item.id).toBe(existingOutput.id); + }); + + apiTest('should create an output with additional parameters', async ({ apiServices }) => { + const outputName = `test-output-params-${Date.now()}`; + const outputHosts = ['https://localhost:9200']; + + const response = await apiServices.fleet.outputs.create( + outputName, + outputHosts, + 'elasticsearch', + { + is_default: false, + ca_trusted_fingerprint: 'test-fingerprint', } - outputId = ''; - }); - - apiTest('should get all outputs', async ({ apiServices }) => { - const response = await apiServices.fleet.outputs.getOutputs(); + ); - expect(response).toHaveStatusCode(200); - expect(response.data).toBeDefined(); - expect(response.data.items).toBeDefined(); - }); + expect(response).toHaveStatusCode(200); + expect(response.data.item.name).toBe(outputName); + expect(response.data.item.is_default).toBe(false); - apiTest('should get a specific output by ID', async ({ apiServices }) => { - // First get all outputs to find an existing one - const allOutputsResponse = await apiServices.fleet.outputs.getOutputs(); - const existingOutput = allOutputsResponse.data.items[0]; + outputId = response.data.item.id; + }); - // Only proceed if we have an existing output - expect(existingOutput).toBeDefined(); + apiTest('should delete an output', async ({ apiServices }) => { + const outputName = `test-output-delete-${Date.now()}`; - const response = await apiServices.fleet.outputs.getOutput(existingOutput.id); - - expect(response).toHaveStatusCode(200); - expect(response.data.item.id).toBe(existingOutput.id); - }); + // First create an output + const createResponse = await apiServices.fleet.outputs.create( + outputName, + ['https://localhost:9200'], + 'elasticsearch' + ); + const deleteOutputId = createResponse.data.item.id; - apiTest('should create an output with additional parameters', async ({ apiServices }) => { - const outputName = `test-output-params-${Date.now()}`; - const outputHosts = ['https://localhost:9200']; + // Then delete it + const response = await apiServices.fleet.outputs.delete(deleteOutputId); - const response = await apiServices.fleet.outputs.create( - outputName, - outputHosts, - 'elasticsearch', - { - is_default: false, - ca_trusted_fingerprint: 'test-fingerprint', - } - ); - - expect(response).toHaveStatusCode(200); - expect(response.data.item.name).toBe(outputName); - expect(response.data.item.is_default).toBe(false); - - outputId = response.data.item.id; - }); - - apiTest('should delete an output', async ({ apiServices }) => { - const outputName = `test-output-delete-${Date.now()}`; - - // First create an output - const createResponse = await apiServices.fleet.outputs.create( - outputName, - ['https://localhost:9200'], - 'elasticsearch' - ); - const deleteOutputId = createResponse.data.item.id; - - // Then delete it - const response = await apiServices.fleet.outputs.delete(deleteOutputId); - - expect(response).toHaveStatusCode(200); - // Don't set outputId since we already deleted it - }); - } -); + expect(response).toHaveStatusCode(200); + // Don't set outputId since we already deleted it + }); +}); apiTest.describe( 'Fleet Server Hosts Management',