mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 21:01:33 +02:00
Add support for bindIp and idleTimeout to config object
This commit is contained in:
@@ -1063,6 +1063,8 @@ public class WLGitBridgeIntegrationTest {
|
||||
String cfgStr =
|
||||
"{\n" +
|
||||
" \"port\": " + port + ",\n" +
|
||||
" \"bindIp\": \"127.0.0.1\",\n" +
|
||||
" \"idleTimeout\": 30000,\n" +
|
||||
" \"rootGitDirectory\": \"" +
|
||||
wlgb.getAbsolutePath() +
|
||||
"\",\n" +
|
||||
|
||||
@@ -16,6 +16,8 @@ public class ConfigTest {
|
||||
public void testConstructWithOauth() {
|
||||
Reader reader = new StringReader("{\n" +
|
||||
" \"port\": 80,\n" +
|
||||
" \"bindIp\": \"127.0.0.1\",\n" +
|
||||
" \"idleTimeout\": 30000,\n" +
|
||||
" \"rootGitDirectory\": \"/var/wlgb/git\",\n" +
|
||||
" \"apiBaseUrl\": \"http://127.0.0.1:60000/api/v0\",\n" +
|
||||
" \"postbackBaseUrl\": \"http://127.0.0.1\",\n" +
|
||||
@@ -42,6 +44,8 @@ public class ConfigTest {
|
||||
public void testConstructWithoutOauth() {
|
||||
Reader reader = new StringReader("{\n" +
|
||||
" \"port\": 80,\n" +
|
||||
" \"bindIp\": \"127.0.0.1\",\n" +
|
||||
" \"idleTimeout\": 30000,\n" +
|
||||
" \"rootGitDirectory\": \"/var/wlgb/git\",\n" +
|
||||
" \"apiBaseUrl\": \"http://127.0.0.1:60000/api/v0\",\n" +
|
||||
" \"postbackBaseUrl\": \"http://127.0.0.1\",\n" +
|
||||
@@ -62,6 +66,8 @@ public class ConfigTest {
|
||||
public void asSanitised() throws Exception {
|
||||
Reader reader = new StringReader("{\n" +
|
||||
" \"port\": 80,\n" +
|
||||
" \"bindIp\": \"127.0.0.1\",\n" +
|
||||
" \"idleTimeout\": 30000,\n" +
|
||||
" \"rootGitDirectory\": \"/var/wlgb/git\",\n" +
|
||||
" \"apiBaseUrl\": \"http://127.0.0.1:60000/api/v0\",\n" +
|
||||
" \"postbackBaseUrl\": \"http://127.0.0.1\",\n" +
|
||||
@@ -75,6 +81,8 @@ public class ConfigTest {
|
||||
Config config = new Config(reader);
|
||||
String expected = "{\n" +
|
||||
" \"port\": 80,\n" +
|
||||
" \"bindIp\": \"127.0.0.1\",\n" +
|
||||
" \"idleTimeout\": 30000,\n" +
|
||||
" \"rootGitDirectory\": \"/var/wlgb/git\",\n" +
|
||||
" \"apiBaseURL\": \"http://127.0.0.1:60000/api/v0/\",\n" +
|
||||
" \"postbackURL\": \"http://127.0.0.1/\",\n" +
|
||||
|
||||
@@ -53,6 +53,8 @@ public class BridgeTest {
|
||||
gcJob = mock(GcJob.class);
|
||||
bridge = new Bridge(
|
||||
new Config(
|
||||
0,
|
||||
"",
|
||||
0,
|
||||
"",
|
||||
"",
|
||||
|
||||
Reference in New Issue
Block a user