use of com.github.nagyesta.abortmission.booster.cucumber.matcher.TagDependencyNameExtractor in project lowkey-vault by nagyesta.
the class MissionOutlineDefinition method defineOutline.
@Override
protected Map<String, Consumer<AbortMissionCommandOps>> defineOutline() {
return Map.of(SHARED_CONTEXT, ops -> {
final TagDependencyNameExtractor extractor = new TagDependencyNameExtractor();
Stream.of("Key", "Secret").forEach(type -> {
final MissionHealthCheckMatcher typeMatcher = matcher().dependencyWith(type).extractor(extractor).build();
final MissionHealthCheckEvaluator featurePercentage = percentageBasedEvaluator(typeMatcher).abortThreshold(ABORT_THRESHOLD).burnInTestCount(TOTAL_BURN_IN_TEST_COUNT).build();
ops.registerHealthCheck(featurePercentage);
Stream.of("Create", "Get", "Delete", "List", "Update", "ListDeleted", "Recover", "Purge", "Backup", "Restore").forEach(subtype -> {
final MissionHealthCheckMatcher subTypeMatcher = matcher().dependencyWith(type + subtype).extractor(extractor).build();
final MissionHealthCheckEvaluator subFeaturePercentage = percentageBasedEvaluator(subTypeMatcher).abortThreshold(ABORT_THRESHOLD).burnInTestCount(BURN_IN_TEST_COUNT).build();
ops.registerHealthCheck(subFeaturePercentage);
});
});
Stream.of("CreateVault", "KeyImport", "KeyEncrypt", "KeySign", "RSA", "EC", "OCT").forEach(tag -> {
final MissionHealthCheckMatcher matcher = matcher().dependencyWith(tag).extractor(extractor).build();
final MissionHealthCheckEvaluator tagPercentage = percentageBasedEvaluator(matcher).abortThreshold(ABORT_THRESHOLD).burnInTestCount(BURN_IN_TEST_COUNT).build();
ops.registerHealthCheck(tagPercentage);
});
});
}
Aggregations