Skip to content

Commit e315af5

Browse files
committed
Polishing.
Add test for VaultCertificateRequest.otherSans. See gh-887
1 parent 55a1b64 commit e315af5

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

spring-vault-core/src/test/java/org/springframework/vault/support/VaultCertificateRequestUnitTests.java

+13
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*/
1616
package org.springframework.vault.support;
1717

18+
import java.util.Arrays;
19+
1820
import org.junit.jupiter.api.Test;
1921

2022
import static org.assertj.core.api.Assertions.*;
@@ -64,4 +66,15 @@ void shouldBuildFullyConfiguredRequest() {
6466
assertThat(request.getPrivateKeyFormat()).isEqualTo("der");
6567
}
6668

69+
@Test
70+
void shouldConsiderOtherSansList() {
71+
72+
VaultCertificateRequest request = VaultCertificateRequest.builder() //
73+
.commonName("hello.com") //
74+
.otherSans(Arrays.asList("foo", "bar")) //
75+
.build();
76+
77+
assertThat(request.getOtherSans()).contains("foo", "bar");
78+
}
79+
6780
}

0 commit comments

Comments
 (0)