Skip to content

Commit 5b212aa

Browse files
committed
Fix tests
1 parent 362e637 commit 5b212aa

2 files changed

Lines changed: 10 additions & 6 deletions

File tree

src/main/java/eu/openanalytics/containerproxy/model/runtime/Proxy.java

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,15 @@ public Map<RuntimeValueKey<?>, RuntimeValue> getRuntimeValues() {
139139
return runtimeValues;
140140
}
141141

142+
@JsonProperty("runtimeValues")
143+
public void setRuntimeValuesJson(Map<String, String> runtimeValues) {
144+
for (Map.Entry<String, String> runtimeValue : runtimeValues.entrySet()) {
145+
RuntimeValueKey<?> key = RuntimeValueKeyRegistry.getRuntimeValue(runtimeValue.getKey());
146+
RuntimeValue value = new RuntimeValue(key, runtimeValue.getValue());
147+
this.runtimeValues.put(key, value);
148+
}
149+
}
150+
142151
public void setRuntimeValues(Map<RuntimeValueKey<?>, RuntimeValue> runtimeValues) {
143152
this.runtimeValues = runtimeValues;
144153
}

src/test/java/eu/openanalytics/containerproxy/test/proxy/TestProxyService.java

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ public class TestProxyService {
5353
private ProxyService proxyService;
5454

5555
@Test
56-
public void launchProxy() throws Exception {
56+
public void launchProxy() {
5757
String specId = environment.getProperty("proxy.specs[0].id");
5858

5959
ProxySpec baseSpec = proxyService.findProxySpec(s -> s.getId().equals(specId), true);
@@ -90,9 +90,4 @@ public synchronized void removeMapping(String path) {
9090
}
9191
}
9292

93-
public static class MockedUserService extends UserService {
94-
public String getCurrentUserId() {
95-
return "jack";
96-
}
97-
}
9893
}

0 commit comments

Comments
 (0)