Skip to content

Commit

Permalink
fixed inspec_profile test
Browse files Browse the repository at this point in the history
Signed-off-by: George M Dias <[email protected]>
  • Loading branch information
georgedias committed Oct 17, 2024
1 parent 0f58be8 commit 53b99cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions test/commands/generate/inspec_profile.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ describe('Test inspec_profile (aliases:xccdf_benchmark2inspec)', () => {
fs.readdirSync('./test/sample_data/xccdf/stigs').forEach(file => {
test
.stdout()
.command(['generate inspec_profile', '-i', path.resolve('./test/sample_data/xccdf/stigs', file), '-o', `${tmpobj.name}`])
.command(['generate inspec_profile', '-i', path.resolve('./test/sample_data/xccdf/stigs', file), '-o', `${tmpobj.name}/profile`])
.it(`Has the same number of controls in the stig as generated - ${file}`, () => {
const parsedXCCDF = processXCCDF(fs.readFileSync(path.resolve('./test/sample_data/xccdf/stigs', file), 'utf8'), false, 'rule')
const fileCount = fs.readdirSync(`${tmpobj.name}/${file}/controls/`).length
const fileCount = fs.readdirSync(`${tmpobj.name}/profile/controls/`).length
expect(fileCount).to.eql(parsedXCCDF.controls.length)
})
})
Expand Down

0 comments on commit 53b99cc

Please sign in to comment.