mirror of
https://github.com/dromara/hertzbeat.git
synced 2026-09-17 09:40:58 +00:00
Align startup setup contracts
This commit is contained in:
+1
-1
@@ -73,7 +73,7 @@ public final class LocalInstallationStartupProbe implements StartupDecisionProbe
|
||||
private static FingerprintState fingerprintState(Path root) {
|
||||
Path path = root.resolve("data/config/.installation-fingerprint");
|
||||
try {
|
||||
boolean present = new LocalInstallationFingerprintStore(path, new SecureRandom()).read().isPresent();
|
||||
boolean present = new LocalInstallationFingerprintStore(root, path, new SecureRandom()).read().isPresent();
|
||||
if (present) {
|
||||
return FingerprintState.PRESENT;
|
||||
}
|
||||
|
||||
+2
-1
@@ -224,7 +224,8 @@ class ManagedConfigDataPrecedenceTest {
|
||||
|
||||
private static ManagedApplicationConfig managedApplicationWithOptions() {
|
||||
ManagedOptionalConfiguration options = new ManagedOptionalConfiguration(
|
||||
Optional.of(new ManagedOptionalConfiguration.ServerInstrumentationSettings(
|
||||
Optional.of(new ManagedOptionalConfiguration.PublicAccessSettings(
|
||||
Optional.empty(),
|
||||
Optional.of("http://server.example.test:4318"),
|
||||
Optional.of("https://server.example.test:4317"))),
|
||||
Optional.of(new ManagedOptionalConfiguration.RetentionSettings(30)),
|
||||
|
||||
+2
-2
@@ -55,8 +55,8 @@ class LocalInstallationStartupProbeTest {
|
||||
new ManagedConfigurationTransaction(root).apply(bundle());
|
||||
assertEquals(RuntimeMode.FULL_SETUP_GATED,
|
||||
new LocalInstallationStartupProbe(root, false).probe(new String[0]).mode());
|
||||
new LocalInstallationFingerprintStore(root.resolve("data/config/.installation-fingerprint"),
|
||||
new SecureRandom()).create();
|
||||
new LocalInstallationFingerprintStore(root,
|
||||
root.resolve("data/config/.installation-fingerprint"), new SecureRandom()).create();
|
||||
assertEquals(RuntimeMode.FULL_SETUP_GATED,
|
||||
new LocalInstallationStartupProbe(root, false).probe(new String[0]).mode());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user