Skip to content

Commit

Permalink
add some tests to kernel and services
Browse files Browse the repository at this point in the history
  • Loading branch information
mgold1234 committed Feb 1, 2024
1 parent cc720b2 commit 7b36c92
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,13 @@ describe('Step Compliance', () => {
/cis red hat enterprise linux 8 benchmark for level 1 - workstation/i
)
);
await screen.getByText(/kernel:/i);

Check failure on line 157 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 157 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited
await screen.getByText(/audit_backlog_limit=8192 audit=1/i);

Check failure on line 158 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 158 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited
await screen.getByText(/disabled services:/i);

Check failure on line 159 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 159 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited
await screen.getByText(/nfs\-server/i);

Check failure on line 160 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 160 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

Unnecessary escape character: \-

Check failure on line 160 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 160 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

Unnecessary escape character: \-
await screen.getByText(/enabled services:/i);

Check failure on line 161 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 161 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited
await screen.getByText(/enabled services:/i);

Check failure on line 162 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (16.x)

`getByText` query is sync so it does not need to be awaited

Check failure on line 162 in src/test/Components/CreateImageWizardV2/CreateImageWizard.compliance.test.tsx

View workflow job for this annotation

GitHub Actions / tests (18.x)

`getByText` query is sync so it does not need to be awaited

// check that the FSC contains a /tmp partition
await clickNext();
// await screen.findByRole('heading', { name: /File system configuration/i });
Expand Down
21 changes: 21 additions & 0 deletions src/test/fixtures/oscap.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,13 @@ export const oscapCustomizations = (
'nftables',
'libselinux',
],
kernel: {
append: "audit_backlog_limit=8192 audit=1"

Check failure on line 36 in src/test/fixtures/oscap.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Replace `"audit_backlog_limit=8192·audit=1"` with `'audit_backlog_limit=8192·audit=1',`

Check failure on line 36 in src/test/fixtures/oscap.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Replace `"audit_backlog_limit=8192·audit=1"` with `'audit_backlog_limit=8192·audit=1',`
},
services: {
disabled: ["nfs-server"],

Check failure on line 39 in src/test/fixtures/oscap.ts

View workflow job for this annotation

GitHub Actions / tests (16.x)

Replace `"nfs-server"` with `'nfs-server'`

Check failure on line 39 in src/test/fixtures/oscap.ts

View workflow job for this annotation

GitHub Actions / tests (18.x)

Replace `"nfs-server"` with `'nfs-server'`
enabled:["crond"]
},
};
}
if (profile === 'xccdf_org.ssgproject.content_profile_cis_workstation_l2') {
Expand All @@ -52,6 +59,13 @@ export const oscapCustomizations = (
'nftables',
'libselinux',
],
kernel: {
append: "audit_backlog_limit=8192 audit=1"
},
services: {
disabled: ["nfs-server","nftables"],
enabled:["crond","firewalld"]
},
};
}
return {
Expand All @@ -70,5 +84,12 @@ export const oscapCustomizations = (
'nftables',
'libselinux',
],
kernel: {
append: "audit_backlog_limit=8192 audit=1"
},
services: {
disabled: ["nfs-server","rpcbind","autofs","nftables"],
enabled:["crond","firewalld","systemd-journald","rsyslog","auditd"]
},
};
};

0 comments on commit 7b36c92

Please sign in to comment.