mirror of
https://github.com/signalapp/Signal-Server.git
synced 2026-12-02 13:06:53 +00:00
Make FoundationDB versions available at runtime
This commit is contained in:
1 parent
12b4ceb4aa
commit
7260a9d5b4
5 files changed
+23
-4
No files matched your search
+20
@@ -0,0 +1,20 @@
|
||||
/*
|
||||
* Copyright 2025 Signal Messenger, LLC
|
||||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
|
||||
package org.whispersystems.textsecuregcm.storage;
|
||||
|
||||
public class FoundationDbVersion {
|
||||
|
||||
private static final String VERSION = "${foundationdb.version}";
|
||||
private static final int API_VERSION = ${foundationdb.api-version};
|
||||
|
||||
public static String getFoundationDbVersion() {
|
||||
return VERSION;
|
||||
}
|
||||
|
||||
public static int getFoundationDbApiVersion() {
|
||||
return API_VERSION;
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -24,7 +24,7 @@ class FoundationDbExtension implements BeforeAllCallback, ExtensionContext.Store
|
||||
? new ServiceContainerFoundationDbDatabaseLifecycleManager(serviceContainerName)
|
||||
: new TestcontainersFoundationDbDatabaseLifecycleManager();
|
||||
|
||||
databaseLifecycleManager.initializeDatabase(FDB.selectAPIVersion(730));
|
||||
databaseLifecycleManager.initializeDatabase(FDB.selectAPIVersion(FoundationDbVersion.getFoundationDbApiVersion()));
|
||||
|
||||
context.getRoot().getStore(ExtensionContext.Namespace.GLOBAL).put(getClass().getName(), this);
|
||||
}
|
||||
|
||||
+1
-2
@@ -17,8 +17,7 @@ class TestcontainersFoundationDbDatabaseLifecycleManager implements FoundationDb
|
||||
private FoundationDBContainer foundationDBContainer;
|
||||
private Database database;
|
||||
|
||||
private static final String FOUNDATIONDB_IMAGE_NAME = "foundationdb/foundationdb:" +
|
||||
System.getProperty("foundationdb.version", "7.3.62");
|
||||
private static final String FOUNDATIONDB_IMAGE_NAME = "foundationdb/foundationdb:" + FoundationDbVersion.getFoundationDbVersion();
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(TestcontainersFoundationDbDatabaseLifecycleManager.class);
|
||||
|
||||
|
||||
Reference in new issue
Block a user