Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
alexreal1314 committed Feb 24, 2025
1 parent 3c0c20d commit 22a032c
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions x-pack/test/cloud_security_posture_functional/pages/rules.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
let findings: typeof pageObjects.findings;
let agentPolicyId: string;

beforeEach(async () => {
before(async () => {
rule = pageObjects.rule;
findings = pageObjects.findings;

Expand All @@ -51,7 +51,8 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
name: 'Test policy',
namespace: 'default',
});

// eslint-disable-next-line prettier/prettier
console.log("agentPolicyResponse1 ", agentPolicyResponse);
agentPolicyId = agentPolicyResponse.item.id;

await createPackagePolicy(
Expand All @@ -64,10 +65,19 @@ export default function ({ getPageObjects, getService }: FtrProviderContext) {
);
await rule.waitForPluginInitialized();
await findings.index.add(k8sFindingsMock);
});

beforeEach(async () => {
await rule.navigateToRulePage('cis_k8s', '1.0.1');
});

afterEach(async () => {
// afterEach(async () => {
// await kibanaServer.savedObjects.cleanStandardList();
// await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server');
// await findings.index.remove();
// });

after(async () => {
await kibanaServer.savedObjects.cleanStandardList();
await esArchiver.unload('x-pack/test/functional/es_archives/fleet/empty_fleet_server');
await findings.index.remove();
Expand Down

0 comments on commit 22a032c

Please sign in to comment.