Skip to content

Commit c704cbe

Browse files
committed
Fix WanCommandAutoCompletionIntegrationTest: expect leading space in completions
- Updated test expectations to include leading space in option completions - When buffer ends with space (e.g., 'wan-copy region '), completions have a leading space character - Changed assertions from '--region' to ' --region' to match actual behavior - This aligns with other completion tests like GfshParserAutoCompletionIntegrationTest
1 parent 7b831e2 commit c704cbe

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

geode-wan/src/integrationTest/java/org/apache/geode/cache/wan/internal/cli/commands/WanCommandAutoCompletionIntegrationTest.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,12 +40,13 @@ public void testCompletionOffersMandatoryOptionsInAlphabeticalOrderForWanCopyReg
4040
// Spring Shell 3.x shows ALL options (both mandatory and optional)
4141
assertThat(candidate.getCandidates()).hasSize(5);
4242
// Verify that mandatory options (--region and --sender-id) are present
43+
// Note: When buffer ends with space, completions have leading space
4344
List<String> candidateStrings = candidate.getCandidates().stream()
4445
.map(c -> c.getValue())
4546
.collect(Collectors.toList());
46-
assertThat(candidateStrings).contains("--region", "--sender-id");
47+
assertThat(candidateStrings).contains(" --region", " --sender-id");
4748
// Also verify optional parameters are present
48-
assertThat(candidateStrings).contains("--max-rate", "--batch-size", "--cancel");
49+
assertThat(candidateStrings).contains(" --max-rate", " --batch-size", " --cancel");
4950
}
5051

5152
@Test

0 commit comments

Comments
 (0)