File tree Expand file tree Collapse file tree 2 files changed +4
-7
lines changed
main/java/org/testcontainers/containers
test/java/org/testcontainers/junit Expand file tree Collapse file tree 2 files changed +4
-7
lines changed Original file line number Diff line number Diff line change 11package org .testcontainers .containers ;
22
33import org .jetbrains .annotations .NotNull ;
4- import org .testcontainers .containers .traits .LinkableContainer ;
54import org .testcontainers .utility .DockerImageName ;
65
76import java .net .MalformedURLException ;
87import java .net .URL ;
98import java .util .Set ;
109
11- public class NginxContainer <SELF extends NginxContainer <SELF >>
12- extends GenericContainer <SELF >
13- implements LinkableContainer {
10+ public class NginxContainer extends GenericContainer <NginxContainer > {
1411
1512 private static final int NGINX_DEFAULT_PORT = 80 ;
1613
@@ -59,7 +56,7 @@ public void setCustomContent(String htmlContentPath) {
5956 }
6057
6158 @ Deprecated
62- public SELF withCustomContent (String htmlContentPath ) {
59+ public NginxContainer withCustomContent (String htmlContentPath ) {
6360 this .setCustomContent (htmlContentPath );
6461 return self ();
6562 }
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public class SimpleNginxTest {
2828
2929 // creatingContainer {
3030 @ Rule
31- public NginxContainer <?> nginx = new NginxContainer <> (NGINX_IMAGE )
31+ public NginxContainer nginx = new NginxContainer (NGINX_IMAGE )
3232 .withCopyFileToContainer (MountableFile .forHostPath (tmpDirectory ), "/usr/share/nginx/html" )
3333 .waitingFor (new HttpWaitStrategy ());
3434
@@ -64,7 +64,7 @@ public void testSimple() throws Exception {
6464 assertHasCorrectExposedAndLivenessCheckPorts (nginx );
6565 }
6666
67- private void assertHasCorrectExposedAndLivenessCheckPorts (NginxContainer <?> nginxContainer ) throws Exception {
67+ private void assertHasCorrectExposedAndLivenessCheckPorts (NginxContainer nginxContainer ) {
6868 assertThat (nginxContainer .getExposedPorts ()).containsExactly (80 );
6969 assertThat (nginxContainer .getLivenessCheckPortNumbers ()).containsExactly (nginxContainer .getMappedPort (80 ));
7070 }
You can’t perform that action at this time.
0 commit comments