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 1
1
package org .testcontainers .containers ;
2
2
3
3
import org .jetbrains .annotations .NotNull ;
4
- import org .testcontainers .containers .traits .LinkableContainer ;
5
4
import org .testcontainers .utility .DockerImageName ;
6
5
7
6
import java .net .MalformedURLException ;
8
7
import java .net .URL ;
9
8
import java .util .Set ;
10
9
11
- public class NginxContainer <SELF extends NginxContainer <SELF >>
12
- extends GenericContainer <SELF >
13
- implements LinkableContainer {
10
+ public class NginxContainer extends GenericContainer <NginxContainer > {
14
11
15
12
private static final int NGINX_DEFAULT_PORT = 80 ;
16
13
@@ -59,7 +56,7 @@ public void setCustomContent(String htmlContentPath) {
59
56
}
60
57
61
58
@ Deprecated
62
- public SELF withCustomContent (String htmlContentPath ) {
59
+ public NginxContainer withCustomContent (String htmlContentPath ) {
63
60
this .setCustomContent (htmlContentPath );
64
61
return self ();
65
62
}
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ public class SimpleNginxTest {
28
28
29
29
// creatingContainer {
30
30
@ Rule
31
- public NginxContainer <?> nginx = new NginxContainer <> (NGINX_IMAGE )
31
+ public NginxContainer nginx = new NginxContainer (NGINX_IMAGE )
32
32
.withCopyFileToContainer (MountableFile .forHostPath (tmpDirectory ), "/usr/share/nginx/html" )
33
33
.waitingFor (new HttpWaitStrategy ());
34
34
@@ -64,7 +64,7 @@ public void testSimple() throws Exception {
64
64
assertHasCorrectExposedAndLivenessCheckPorts (nginx );
65
65
}
66
66
67
- private void assertHasCorrectExposedAndLivenessCheckPorts (NginxContainer <?> nginxContainer ) throws Exception {
67
+ private void assertHasCorrectExposedAndLivenessCheckPorts (NginxContainer nginxContainer ) {
68
68
assertThat (nginxContainer .getExposedPorts ()).containsExactly (80 );
69
69
assertThat (nginxContainer .getLivenessCheckPortNumbers ()).containsExactly (nginxContainer .getMappedPort (80 ));
70
70
}
You can’t perform that action at this time.
0 commit comments