-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
Description
Description
When running OFT with command line argument --wanted-tags=_ it imports all specification items
Steps to Reproduce
- Create a spec item
awith tag "tagA" and one itembwithout tags - Run OFT with
--wanted-tags=_
Expected behavior
OFT imports only the item b
Environment
- OFT: 4.1.0
Additional context
Failing test case for TestSpecificationListBuilder reproducing the bug:
@Test
void testFilterSpecificationItemsByTagsOnlyWithoutTag()
{
final FilterSettings filterSettings = FilterSettings.builder() //
.tags(emptySet()) //
.withoutTags(true) //
.build();
final SpecificationListBuilder builder = SpecificationListBuilder
.createWithFilter(filterSettings);
addItemWithTags(builder, "out-A", "client", "database");
addItemWithTags(builder, "out-B", "server", "database");
addItemWithTags(builder, "out-C", "exporter", "database");
addItemWithTags(builder, "in-D");
final List<SpecificationItem> items = builder.build();
assertThat(items.stream().map(SpecificationItem::getName).collect(Collectors.toList()),
containsInAnyOrder("in-D"));
}See also itsallcode/openfasttrace-maven-plugin@f9fbbed (#71)
Workaround
Specify any unused tag, e.g. --wanted-tags=_,unusedTag
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
📫 Backlog