Skip to content

Commit

Permalink
Reuse plantuml server docker across tests cases.
Browse files Browse the repository at this point in the history
Signed-off-by: Sjoerd Talsma <[email protected]>
  • Loading branch information
sjoerdtalsma committed Jul 22, 2024
1 parent 6672128 commit 46f320e
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2016-2022 Talsma ICT
* Copyright 2016-2024 Talsma ICT
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -42,15 +42,15 @@ class RemotePlantumlGeneratorTest {
static final String testUml = "@startuml\r\nBob -> Alice : hello\r\n@enduml";

@Container
GenericContainer plantumlServer = new GenericContainer(DockerImageName.parse("plantuml/plantuml-server"))
static final GenericContainer PLANTUML_SERVER = new GenericContainer(DockerImageName.parse("plantuml/plantuml-server"))
.withExposedPorts(8080);

PlantumlGenerator subject;

@BeforeEach
void setUp() {
subject = new RemotePlantumlGenerator(String.format("http://%s:%s/",
plantumlServer.getHost(), plantumlServer.getMappedPort(8080)));
PLANTUML_SERVER.getHost(), PLANTUML_SERVER.getMappedPort(8080)));
}

@Test
Expand Down

0 comments on commit 46f320e

Please sign in to comment.