Skip to content

Commit ca8151e

Browse files
authored
Revert allowedHosts missing value checks (#21923)
1 parent 7f36386 commit ca8151e

File tree

2 files changed

+0
-23
lines changed

2 files changed

+0
-23
lines changed

airbyte-workers/src/main/java/io/airbyte/workers/utils/ConfigReplacer.java

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,6 @@ public AllowedHosts getAllowedHosts(AllowedHosts allowedHosts, JsonNode config)
4848
final List<String> hosts = allowedHosts.getHosts();
4949
for (String host : hosts) {
5050
final String replacedString = sub.replace(host);
51-
if (replacedString.contains("${")) {
52-
throw new IOException(
53-
"The allowed host value, '" + host + "', is expecting an interpolation value from the connector's configuration, but none is present");
54-
}
5551
resolvedHosts.add(replacedString);
5652
}
5753

airbyte-workers/src/test/java/io/airbyte/workers/utils/ConfigReplacerTest.java

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -42,23 +42,4 @@ void getAllowedHostsGeneralTest() throws IOException {
4242
assertThat(response.getHosts()).isEqualTo(expected);
4343
}
4444

45-
@Test()
46-
void getAllowedHostsMissingValue() throws IOException {
47-
final AllowedHosts allowedHosts = new AllowedHosts();
48-
final List<String> hosts = new ArrayList();
49-
hosts.add("${subdomain}.vendor.com");
50-
allowedHosts.setHosts(hosts);
51-
52-
final String configJson = "{\"password\": \"abc123\"}";
53-
final JsonNode config = mapper.readValue(configJson, JsonNode.class);
54-
55-
try {
56-
replacer.getAllowedHosts(allowedHosts, config);
57-
throw new RuntimeException("should not get here");
58-
} catch (Exception e) {
59-
assertThat(e).hasMessage(
60-
"The allowed host value, '${subdomain}.vendor.com', is expecting an interpolation value from the connector's configuration, but none is present");
61-
}
62-
}
63-
6445
}

0 commit comments

Comments
 (0)