Polishing.

Add test for VaultCertificateRequest.otherSans.

See gh-887
This commit is contained in:
Mark Paluch
2025-04-25 11:18:12 +02:00
parent 55a1b64830
commit e315af5094

View File

@@ -15,6 +15,8 @@
*/
package org.springframework.vault.support;
import java.util.Arrays;
import org.junit.jupiter.api.Test;
import static org.assertj.core.api.Assertions.*;
@@ -64,4 +66,15 @@ class VaultCertificateRequestUnitTests {
assertThat(request.getPrivateKeyFormat()).isEqualTo("der");
}
@Test
void shouldConsiderOtherSansList() {
VaultCertificateRequest request = VaultCertificateRequest.builder() //
.commonName("hello.com") //
.otherSans(Arrays.asList("foo", "bar")) //
.build();
assertThat(request.getOtherSans()).contains("foo", "bar");
}
}