Skip to content

Commit 91a6db8

Browse files
authored
Correct environment variables
1 parent 3648377 commit 91a6db8

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/test/java/no/neic/localega/deploy/IngestionTest.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ private void upload() throws IOException, InvalidKeySpecException, NoSuchAlgorit
116116
String uploadURL = String.format("https://localhost/stream/%s?md5=%s", encFile.getName(), md5Hex);
117117
JsonNode jsonResponse = Unirest
118118
.patch(uploadURL)
119-
.basicAuth("{{EGA_BOX_USERNAME}}", "{{EGA_BOX_PASSWORD}}")
119+
.basicAuth(System.getenv("EGA_BOX_USERNAME"), System.getenv("EGA_BOX_PASSWORD"))
120120
.header("Proxy-Authorization", "Bearer " + token)
121121
.body(FileUtils.readFileToByteArray(encFile))
122122
.asJson()
@@ -130,7 +130,7 @@ private void upload() throws IOException, InvalidKeySpecException, NoSuchAlgorit
130130
FileUtils.sizeOf(encFile));
131131
jsonResponse = Unirest
132132
.patch(finalizeURL)
133-
.basicAuth("{{EGA_BOX_USERNAME}}", "{{EGA_BOX_PASSWORD}}")
133+
.basicAuth(System.getenv("EGA_BOX_USERNAME"), System.getenv("EGA_BOX_PASSWORD"))
134134
.header("Proxy-Authorization", "Bearer " + token)
135135
.asJson()
136136
.getBody();
@@ -152,7 +152,7 @@ private void ingest() throws IOException, TimeoutException, NoSuchAlgorithmExcep
152152
.correlationId(UUID.randomUUID().toString())
153153
.build();
154154

155-
String message = String.format("{\"type\":\"ingest\",\"user\":\"%s\",\"filepath\":\"/[email protected]/files/%s\"}", "{{EGA_BOX_USERNAME}}", encFile.getName());
155+
String message = String.format("{\"type\":\"ingest\",\"user\":\"%s\",\"filepath\":\"/[email protected]/files/%s\"}", System.getenv("EGA_BOX_USERNAME"), encFile.getName());
156156
log.info(message);
157157
channel.basicPublish("localega.v1",
158158
"files",

0 commit comments

Comments
 (0)