V2Wizard: Add masked services to the "Disabled services" code block

Fixes #1985

This concatenates masked service to the disabled services so both get rendered in the "Disabled service" code block.

Test to check this was also added.
This commit is contained in:
regexowl 2024-04-25 10:06:32 +02:00 committed by Lucas Garfield
parent 45be93db11
commit b6041d2022
4 changed files with 22 additions and 11 deletions

View file

@ -99,12 +99,12 @@ describe('Step Compliance', () => {
// check that the FSC does not contain a /tmp partition
await clickNext();
// await screen.findByRole('heading', { name: /File system configuration/i });
// expect(
// screen.queryByRole('cell', {
// name: /tmp/i,
// })
// ).not.toBeInTheDocument();
await screen.findByRole('heading', { name: /File system configuration/i });
expect(
screen.queryByRole('cell', {
name: /tmp/i,
})
).not.toBeInTheDocument();
await clickNext(); // skip Repositories
@ -161,13 +161,16 @@ describe('Step Compliance', () => {
await screen.findByText(/kernel arguments:/i);
await screen.findByText(/audit_backlog_limit=8192 audit=1/i);
await screen.findByText(/disabled services:/i);
await screen.findByText(
/rpcbind autofs nftables nfs-server emacs-service/i
);
await screen.findByText(/enabled services:/i);
await screen.findByText(/crond/i);
// check that the FSC contains a /tmp partition
await clickNext();
// await screen.findByRole('heading', { name: /File system configuration/i });
// await screen.findByText(/tmp/i);
await screen.findByRole('heading', { name: /File system configuration/i });
await screen.findByText(/tmp/i);
await clickNext(); // skip Repositories

View file

@ -96,6 +96,7 @@ const expectedPackagesCisL1 = ['aide', 'neovim'];
const expectedServicesCisL1 = {
enabled: ['crond', 'neovim-service'],
disabled: ['rpcbind', 'autofs', 'nftables'],
masked: ['nfs-server', 'emacs-service'],
};