Skip to content

Commit

Permalink
[8.x] [Cloud Security] [Agentless] Create Serverless Quality Gate tes…
Browse files Browse the repository at this point in the history
…ts for running Agentless sanity tests every 3 hours (#193078) (#193734)

# Backport

This will backport the following commits from `main` to `8.x`:
- [[Cloud Security] [Agentless] Create Serverless Quality Gate tests for
running Agentless sanity tests every 3 hours
(#193078)](#193078)

<!--- Backport version: 9.4.3 -->

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

<!--BACKPORT
[{"author":{"name":"seanrathier","email":"[email protected]"},"sourceCommit":{"committedDate":"2024-09-23T14:46:15Z","message":"[Cloud
Security] [Agentless] Create Serverless Quality Gate tests for running
Agentless sanity tests every 3 hours
(#193078)","sha":"946c26ea77a923463e52ca9887847fd9005ec149","branchLabelMapping":{"^v9.0.0$":"main","^v8.16.0$":"8.x","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["WIP","release_note:skip","v9.0.0","Team:Cloud
Security","backport:prev-minor"],"title":"[Cloud Security] [Agentless]
Create Serverless Quality Gate tests for running Agentless sanity tests
every 3
hours","number":193078,"url":"https://github.com/elastic/kibana/pull/193078","mergeCommit":{"message":"[Cloud
Security] [Agentless] Create Serverless Quality Gate tests for running
Agentless sanity tests every 3 hours
(#193078)","sha":"946c26ea77a923463e52ca9887847fd9005ec149"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.0.0","branchLabelMappingKey":"^v9.0.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/193078","number":193078,"mergeCommit":{"message":"[Cloud
Security] [Agentless] Create Serverless Quality Gate tests for running
Agentless sanity tests every 3 hours
(#193078)","sha":"946c26ea77a923463e52ca9887847fd9005ec149"}}]}]
BACKPORT-->

Co-authored-by: seanrathier <[email protected]>
  • Loading branch information
kibanamachine and seanrathier authored Sep 23, 2024
1 parent 69bdc98 commit 15751ec
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
let cisIntegration: typeof pageObjects.cisAddIntegration;

before(async () => {
// If process.env.TEST_CLOUD is set, then the test is running in the Serverless Quality Gates
// and this MSW server will be listening for a request that will never come.
mockApiServer = mockAgentlessApiService.listen(8089); // Start the usage api mock server on port 8089
await pageObjects.svlCommonPage.loginAsAdmin();
cisIntegration = pageObjects.cisAddIntegration;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { FtrProviderContext } from '../../../../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
describe('cloud_security_posture', function () {
this.tags(['cloud_security_posture_agentless']);
this.tags(['cloud_security_posture']);
loadTestFile(require.resolve('./create_agent'));
});
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
import { FtrProviderContext } from '../../ftr_provider_context';

export default function ({ loadTestFile }: FtrProviderContext) {
const isCloud = !!process.env.TEST_CLOUD;

describe('serverless security UI', function () {
this.tags(['esGate']);

Expand All @@ -16,5 +18,9 @@ export default function ({ loadTestFile }: FtrProviderContext) {
loadTestFile(require.resolve('./ftr/cases'));
loadTestFile(require.resolve('./ftr/advanced_settings'));
loadTestFile(require.resolve('./ml'));
if (isCloud) {
// only run the agentless API tests in the Serverless Quality Gates
loadTestFile(require.resolve('./ftr/cloud_security_posture/agentless_api'));
}
});
}

0 comments on commit 15751ec

Please sign in to comment.