-
-
Notifications
You must be signed in to change notification settings - Fork 2.2k
/
LocalWhisperServerService.java
37 lines (29 loc) · 1.31 KB
/
LocalWhisperServerService.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
/*
* Copyright 2024 Signal Messenger, LLC
* SPDX-License-Identifier: AGPL-3.0-only
*/
package org.whispersystems.textsecuregcm;
import io.dropwizard.util.Resources;
import java.util.Optional;
/**
* This class may be run directly from a correctly configured IDE, or using the command line:
* <p>
* <code>./mvnw clean integration-test -DskipTests=true -Ptest-server</code>
* <p>
* <strong>NOTE: many features are non-functional, especially those that depend on external services</strong>
* <p>
* By default, it will use {@code config/test.yml}, but this may be overridden by setting an environment variable,
* {@value SIGNAL_SERVER_CONFIG_ENV_VAR}, with a custom path.
*/
public class LocalWhisperServerService {
private static final String SIGNAL_SERVER_CONFIG_ENV_VAR = "SIGNAL_SERVER_CONFIG";
public static void main(String[] args) throws Exception {
System.setProperty("secrets.bundle.filename",
Resources.getResource("config/test-secrets-bundle.yml").getPath());
System.setProperty("sqlite.dir", "service/target/lib");
System.setProperty("aws.region", "local-test-region");
final String config = Optional.ofNullable(System.getenv(SIGNAL_SERVER_CONFIG_ENV_VAR))
.orElse(Resources.getResource("config/test.yml").getPath());
new WhisperServerService().run("server", config);
}
}