aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2017-05-03 19:52:20 +1200
committerGitHub <noreply@github.com>2017-05-03 19:52:20 +1200
commitc22fd3e9e786575a912684f95b41e413f9d96292 (patch)
treefa5b6a248ece0abdf2774902f7c183ef35a67edd /test
parent1bf2353bafe3481f1deeb9e73e9bcaa1a40f0103 (diff)
parentfa6548a7b613b5bd3919cbf0269d58b2d8ebb999 (diff)
downloadtrackermap-server-c22fd3e9e786575a912684f95b41e413f9d96292.tar.gz
trackermap-server-c22fd3e9e786575a912684f95b41e413f9d96292.tar.bz2
trackermap-server-c22fd3e9e786575a912684f95b41e413f9d96292.zip
Merge pull request #3136 from sillaps/master
Environment variables
Diffstat (limited to 'test')
-rw-r--r--test/org/traccar/config/EnvVarTest.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/org/traccar/config/EnvVarTest.java b/test/org/traccar/config/EnvVarTest.java
new file mode 100644
index 000000000..b90fd485c
--- /dev/null
+++ b/test/org/traccar/config/EnvVarTest.java
@@ -0,0 +1,18 @@
+package org.traccar.config;
+
+import org.junit.Test;
+import static org.junit.Assert.assertEquals;
+import org.traccar.Config;
+
+public class EnvVarTest {
+
+ @Test
+ public void testFormat() {
+ assertEquals("DATABASE_URL", Config.getEnvVarName("database.url"));
+ assertEquals("DATABASE_CHECK_CONNECTION", Config.getEnvVarName("database.checkConnection"));
+ assertEquals("DATABASE_MAX_POOL_SIZE", Config.getEnvVarName("database.maxPoolSize"));
+ assertEquals("DEVICE_MANAGER_LOOKUP_GROUPS_ATTRIBUTE", Config.getEnvVarName("deviceManager.lookupGroupsAttribute"));
+ assertEquals("COMMAND_FALLBACK_TO_SMS", Config.getEnvVarName("command.fallbackToSms"));
+ assertEquals("STATUS_TIMEOUT", Config.getEnvVarName("status.timeout"));
+ }
+}