Skip to content

Commit

Permalink
Fix tests #1768
Browse files Browse the repository at this point in the history
  • Loading branch information
Jeeppler committed Feb 17, 2023
1 parent c743930 commit 42a6943
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -122,13 +122,13 @@ void internal_scan_types_are_NOT_assigned_to_any_group() {
}
}

@EnumSource(mode = Mode.INCLUDE, value = ScanType.class, names = { "CODE_SCAN", "LICENSE_SCAN" })
@EnumSource(mode = Mode.INCLUDE, value = ScanType.class, names = { "CODE_SCAN", "LICENSE_SCAN", "SECRET_SCAN" })
@ParameterizedTest
void group_static_accepts(ScanType scanType) {
assertGroupAssignedTo(ModuleGroup.STATIC, scanType);
}

@EnumSource(mode = Mode.EXCLUDE, value = ScanType.class, names = { "CODE_SCAN", "LICENSE_SCAN" })
@EnumSource(mode = Mode.EXCLUDE, value = ScanType.class, names = { "CODE_SCAN", "LICENSE_SCAN", "SECRET_SCAN" })
@ParameterizedTest
@NullSource
void group_static_NOT_accepts(ScanType scanType) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -697,6 +697,8 @@ void secret_scan__empty_config_results_in_error() throws Exception {
model.setApiVersion("1.0");
model.setSecretScan(secretScan);

modelSupportCollectedScanTypes.add(ScanType.SECRET_SCAN); // simulate correct module group found

/* execute */
SecHubConfigurationModelValidationResult result = validatorToTest.validate(model);

Expand All @@ -723,6 +725,8 @@ void secret_scan__config_with_data() throws Exception {
model.setApiVersion("1.0");
model.setSecretScan(secretScan);
model.setData(dataConfiguration);

modelSupportCollectedScanTypes.add(ScanType.SECRET_SCAN); // simulate correct module group found

/* execute */
SecHubConfigurationModelValidationResult result = validatorToTest.validate(model);
Expand Down

0 comments on commit 42a6943

Please sign in to comment.