mirror of
https://github.com/google/nomulus
synced 2026-01-09 07:33:42 +00:00
Remove SSL initializer from the prober (#378)
The prober now uses the common SSL initializer in the networking subproject. Also changed both initializers to take an ImmutableList of certificates other than an array of those, for better immutability. I have no idea where these lockfile changes are coming from. They seem to be pure noise as far as code review is concerned.
This commit is contained in:
@@ -20,6 +20,7 @@ import static google.registry.networking.handler.SslInitializerTestUtils.signKey
|
||||
import static google.registry.testing.JUnitBackports.assertThrows;
|
||||
import static java.nio.charset.StandardCharsets.UTF_8;
|
||||
|
||||
import com.google.common.collect.ImmutableList;
|
||||
import dagger.Component;
|
||||
import dagger.Module;
|
||||
import dagger.Provides;
|
||||
@@ -79,7 +80,7 @@ public class CertificateModuleTest {
|
||||
byte[] pemBytes = getPemBytes(cert, ssc.cert(), key);
|
||||
component = createComponent(pemBytes);
|
||||
assertThat(component.privateKey()).isEqualTo(key);
|
||||
assertThat(component.certificates()).asList().containsExactly(cert, ssc.cert()).inOrder();
|
||||
assertThat(component.certificates()).containsExactly(cert, ssc.cert()).inOrder();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -87,7 +88,7 @@ public class CertificateModuleTest {
|
||||
byte[] pemBytes = getPemBytes(cert, key, ssc.cert());
|
||||
component = createComponent(pemBytes);
|
||||
assertThat(component.privateKey()).isEqualTo(key);
|
||||
assertThat(component.certificates()).asList().containsExactly(cert, ssc.cert()).inOrder();
|
||||
assertThat(component.certificates()).containsExactly(cert, ssc.cert()).inOrder();
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -131,13 +132,13 @@ public class CertificateModuleTest {
|
||||
private final byte[] pemBytes;
|
||||
|
||||
PemBytesModule(byte[] pemBytes) {
|
||||
this.pemBytes = pemBytes;
|
||||
this.pemBytes = pemBytes.clone();
|
||||
}
|
||||
|
||||
@Provides
|
||||
@Named("pemBytes")
|
||||
byte[] providePemBytes() {
|
||||
return pemBytes;
|
||||
return pemBytes.clone();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -156,6 +157,6 @@ public class CertificateModuleTest {
|
||||
PrivateKey privateKey();
|
||||
|
||||
@Prod
|
||||
X509Certificate[] certificates();
|
||||
ImmutableList<X509Certificate> certificates();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user