Skip to content

Commit d77b684

Browse files
committed
use API_KEY var
1 parent e77602d commit d77b684

File tree

2 files changed

+6
-5
lines changed

2 files changed

+6
-5
lines changed

.travis.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,10 @@ before_script:
3737
# Undo `_JAVA_OPTIONS` environment variable; see https://github.com/travis-ci/travis-ci/issues/8408
3838
before_script:
3939
- _JAVA_OPTIONS=
40+
- "mvn --version"
41+
- "if [ -z \"$API_KEY\" ]; then API_KEY=78da6e9a-273e-43d1-bdda-8f24e007a1fa; fi" # change in GraphHopperWebIT too
4042
script:
41-
- "mvn --version && mvn clean test verify checkstyle:check findbugs:check forbiddenapis:check -B"
43+
- "mvn --version && mvn -Dkey=$API_KEY clean test verify checkstyle:check findbugs:check forbiddenapis:check -B"
4244

4345
after_success:
4446
# deploy snapshot artifacts to sonatype and if tagged deploy the release to maven central

client-hc/src/test/java/com/graphhopper/api/GraphHopperWebIT.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,16 +26,15 @@
2626
*/
2727
public class GraphHopperWebIT {
2828

29-
public static final String KEY = "614b8305-b4db-48c9-bf4a-40de90919939";
29+
public static final String KEY = System.getProperty("key", "78da6e9a-273e-43d1-bdda-8f24e007a1fa");
3030

3131
private final GraphHopperWeb gh = new GraphHopperWeb();
3232
private final GraphHopperMatrixWeb ghMatrix = new GraphHopperMatrixWeb();
3333

3434
@Before
3535
public void setUp() {
36-
String key = System.getProperty("graphhopper.key", KEY);
37-
gh.setKey(key);
38-
ghMatrix.setKey(key);
36+
gh.setKey(KEY);
37+
ghMatrix.setKey(KEY);
3938
}
4039

4140
@Test

0 commit comments

Comments
 (0)