[Cloud Security] [Agentless] Create Serverless Quality Gate tests for running Agentless sanity tests every 3 hours (#193078)

This commit is contained in:
seanrathier 2024-09-23 10:46:15 -04:00 committed by GitHub
parent 65b7bf9586
commit 946c26ea77
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 1 deletions

View file

@ -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;

View file

@ -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'));
});
}

View file

@ -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']);
@ -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'));
}
});
}