Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .buildkite/scout_ci_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,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)
Expand Down
10 changes: 2 additions & 8 deletions .buildkite/scripts/steps/test/scout/test_run_builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand All @@ -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'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,82 +183,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] }, () => {

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.

Why was the tags.serverless.security.complete removed?

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.

API was returning 400, we don't have SecSol tests for now. I think tag was added by default and we never actually tested it

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.item.name).toBe(outputName);
expect(response.data.item.is_default).toBe(false);

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();
outputId = response.data.item.id;
});

const response = await apiServices.fleet.outputs.getOutput(existingOutput.id);

expect(response).toHaveStatusCode(200);
expect(response.data.item.id).toBe(existingOutput.id);
});
apiTest('should delete an output', async ({ apiServices }) => {
const outputName = `test-output-delete-${Date.now()}`;

apiTest('should create an output with additional parameters', async ({ apiServices }) => {
const outputName = `test-output-params-${Date.now()}`;
const outputHosts = ['https://localhost:9200'];
// First create an output
const createResponse = await apiServices.fleet.outputs.create(
outputName,
['https://localhost:9200'],
'elasticsearch'
);
const deleteOutputId = createResponse.data.item.id;

const response = await apiServices.fleet.outputs.create(
outputName,
outputHosts,
'elasticsearch',
{
is_default: false,
ca_trusted_fingerprint: 'test-fingerprint',
}
);
// Then delete it
const response = await apiServices.fleet.outputs.delete(deleteOutputId);

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',
Expand Down
Loading