Skip to content

Commit 9ce0d5b

Browse files
authored
Feature/full backend tests/expose docker network (#10699)
* Fix apache httpclient to version 4.5.13 Managing and fixing the http client to a specific version works around resolving the dependency to different versions in plugins. This would cause unexpected problems as described in aws/aws-sdk-java-v2#1795 * Expose docker network of graylog backend test container Expose the docker network, so that other containers that need to be launched during a test can use the same network.
1 parent 4caf6b4 commit 9ce0d5b

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

graylog2-server/src/test/java/org/graylog/testing/completebackend/GraylogBackend.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
public class GraylogBackend {
3636

3737
private static final Logger LOG = LoggerFactory.getLogger(GraylogBackend.class);
38+
private final Network network;
3839
private final ElasticsearchInstance es;
3940
private final MongoDBInstance mongodb;
4041
private final NodeInstance node;
@@ -83,7 +84,7 @@ private static GraylogBackend createStartedBackend(int[] extraPorts,
8384
extraPorts,
8485
pluginJars, mavenProjectDir);
8586

86-
return new GraylogBackend(esInstance, mongoDB, node);
87+
return new GraylogBackend(network, esInstance, mongoDB, node);
8788
} catch (InterruptedException | ExecutionException e) {
8889
LOG.error("Container creation aborted", e);
8990
throw new RuntimeException(e);
@@ -92,7 +93,8 @@ private static GraylogBackend createStartedBackend(int[] extraPorts,
9293
}
9394
}
9495

95-
private GraylogBackend(ElasticsearchInstance es, MongoDBInstance mongodb, NodeInstance node) {
96+
private GraylogBackend(Network network, ElasticsearchInstance es, MongoDBInstance mongodb, NodeInstance node) {
97+
this.network = network;
9698
this.es = es;
9799
this.mongodb = mongodb;
98100
this.node = node;
@@ -129,4 +131,8 @@ public void printServerLog() {
129131
public int mappedPortFor(int originalPort) {
130132
return node.mappedPortFor(originalPort);
131133
}
134+
135+
public Network network() {
136+
return this.network;
137+
}
132138
}

0 commit comments

Comments
 (0)