Skip to content

Commit 65c3809

Browse files
[Test] Fix testGenerateMultipleCertificateWithNewCA (#126621) (#126654)
Fixes an edge case where we randomly generate an empty list of key usages then pass it to `certutil` command. The empty means just apply the defaults, but we assert based on the generated empty set. Resolves #126471 Co-authored-by: Tim Vernum <[email protected]> (cherry picked from commit 3db258e) # Conflicts: # muted-tests.yml
1 parent 942640e commit 65c3809

File tree

2 files changed

+1
-4
lines changed

2 files changed

+1
-4
lines changed

muted-tests.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -256,9 +256,6 @@ tests:
256256
- class: org.elasticsearch.xpack.esql.expression.function.scalar.convert.ParseIpTests
257257
method: testLeadingZerosAreOctal {TestCase[str=v4, validLeadingZerosRejected=true, validLeadingZerosAreDecimal=true, validLeadingZerosAreOctal=true]}
258258
issue: https://github.com/elastic/elasticsearch/issues/126496
259-
- class: org.elasticsearch.xpack.security.cli.HttpCertificateCommandTests
260-
method: testGenerateMultipleCertificateWithNewCA
261-
issue: https://github.com/elastic/elasticsearch/issues/126471
262259

263260
# Examples:
264261
#

x-pack/plugin/security/cli/src/test/java/org/elasticsearch/xpack/security/cli/HttpCertificateCommandTests.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ public void testGenerateMultipleCertificateWithNewCA() throws Exception {
380380
caDN = "CN=" + randomAlphaOfLengthBetween(3, 8);
381381
caYears = randomIntBetween(1, 3);
382382
caKeySize = randomFrom(2048, 3072, 4096);
383-
caKeyUsage = randomSubsetOf(CertGenUtils.KEY_USAGE_MAPPINGS.keySet());
383+
caKeyUsage = randomNonEmptySubsetOf(CertGenUtils.KEY_USAGE_MAPPINGS.keySet());
384384
terminal.addTextInput(caDN);
385385
terminal.addTextInput(caYears + "y");
386386
terminal.addTextInput(Integer.toString(caKeySize));

0 commit comments

Comments
 (0)