Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package org.testcontainers.containers;

import org.jetbrains.annotations.NotNull;
import org.testcontainers.containers.traits.LinkableContainer;
import org.testcontainers.utility.DockerImageName;

import java.net.MalformedURLException;
import java.net.URL;
import java.util.Set;

public class NginxContainer<SELF extends NginxContainer<SELF>>
extends GenericContainer<SELF>
implements LinkableContainer {
public class NginxContainer extends GenericContainer<NginxContainer> {

private static final int NGINX_DEFAULT_PORT = 80;

Expand Down Expand Up @@ -59,7 +56,7 @@ public void setCustomContent(String htmlContentPath) {
}

@Deprecated
public SELF withCustomContent(String htmlContentPath) {
public NginxContainer withCustomContent(String htmlContentPath) {
this.setCustomContent(htmlContentPath);
return self();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public class SimpleNginxTest {

// creatingContainer {
@Rule
public NginxContainer<?> nginx = new NginxContainer<>(NGINX_IMAGE)
public NginxContainer nginx = new NginxContainer(NGINX_IMAGE)
.withCopyFileToContainer(MountableFile.forHostPath(tmpDirectory), "/usr/share/nginx/html")
.waitingFor(new HttpWaitStrategy());

Expand Down Expand Up @@ -64,7 +64,7 @@ public void testSimple() throws Exception {
assertHasCorrectExposedAndLivenessCheckPorts(nginx);
}

private void assertHasCorrectExposedAndLivenessCheckPorts(NginxContainer<?> nginxContainer) throws Exception {
private void assertHasCorrectExposedAndLivenessCheckPorts(NginxContainer nginxContainer) {
assertThat(nginxContainer.getExposedPorts()).containsExactly(80);
assertThat(nginxContainer.getLivenessCheckPortNumbers()).containsExactly(nginxContainer.getMappedPort(80));
}
Expand Down
Loading