Skip to content

Commit

Permalink
Simplify & improve test coverage
Browse files Browse the repository at this point in the history
Signed-off-by: Lou DeGenaro <[email protected]>
  • Loading branch information
degenaro committed Jan 7, 2025
1 parent 3997788 commit 79dfc1f
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
Binary file not shown.
10 changes: 10 additions & 0 deletions tests/trestle/tasks/cis_xlsx_to_oscal_cd_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,16 @@ def test_cis_xlsx_to_oscal_cd_execute_combined(tmp_path: pathlib.Path):
_validate_db2(tmp_path)


def test_cis_xlsx_to_oscal_cd_execute_missing_column(tmp_path: pathlib.Path):
"""Test execute call - db2."""
section = _get_section(tmp_path, db2_config)
section['benchmark-file'
] = 'tests/data/tasks/cis-xlsx-to-oscal-cd/CIS_IBM_Db2_11_Benchmark_v1.1.0.snippet_missing_column.xlsx'
tgt = cis_xlsx_to_oscal_cd.CisXlsxToOscalCd(section)
retval = tgt.execute()
assert retval == TaskOutcome.FAILURE


def test_cis_xlsx_to_oscal_cd_execute_bad_config(tmp_path: pathlib.Path):
"""Test execute call - bad config."""
section = _get_section(tmp_path, db2_config)
Expand Down

0 comments on commit 79dfc1f

Please sign in to comment.