-
Notifications
You must be signed in to change notification settings - Fork 27
Upgrade testcontainers #261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,10 @@ private static void startContainer() { | |
| IOUtils.copy(imageInputStream, outputStream); | ||
| } | ||
|
|
||
| // for some reason, when running on Mac, the above copied file is not fully ready after the | ||
| // stream being closed; sleeping a little bit could work around that | ||
| Thread.sleep(1000); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is pretty strange and it is not about unflushed stream because I tried. |
||
|
|
||
| ExecResult execResult = | ||
| INSTANCE.execInContainer( | ||
| "docker", "load", "-i", "integration-tests/target/jflyte.tar.gz"); | ||
|
|
@@ -106,9 +110,8 @@ public void start() { | |
|
|
||
| logger().info("Flyte is ready!"); | ||
|
|
||
| String consoleUri = | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated. |
||
| String.format("http://%s:%d/console", getContainerIpAddress(), getMappedPort(30081)); | ||
| String k8sUri = String.format("http://%s:%d", getContainerIpAddress(), getMappedPort(30082)); | ||
| String consoleUri = String.format("http://%s:%d/console", getHost(), getMappedPort(30081)); | ||
| String k8sUri = String.format("http://%s:%d", getHost(), getMappedPort(30082)); | ||
|
|
||
| logger().info("Flyte UI is available at " + consoleUri); | ||
| logger().info("K8s dashboard is available at " + k8sUri); | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -24,7 +24,6 @@ | |
| import org.junit.rules.ExternalResource; | ||
| import org.testcontainers.DockerClientFactory; | ||
| import org.testcontainers.containers.Network; | ||
| import org.testcontainers.utility.ResourceReaper; | ||
|
|
||
| // see https://github.com/testcontainers/testcontainers-java/issues/3081 | ||
|
|
||
|
|
@@ -79,7 +78,7 @@ protected void after() { | |
| @Override | ||
| public void close() { | ||
| if (initialized.getAndSet(false)) { | ||
| ResourceReaper.instance().removeNetworkById(NAME); | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Deprecated. |
||
| DockerClientFactory.instance().client().removeNetworkCmd(NAME).exec(); | ||
| } | ||
| } | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -21,6 +21,9 @@ | |
| import static org.junit.jupiter.api.Assertions.assertNull; | ||
| import static org.testcontainers.containers.localstack.LocalStackContainer.Service.S3; | ||
|
|
||
| import com.amazonaws.auth.AWSStaticCredentialsProvider; | ||
| import com.amazonaws.auth.BasicAWSCredentials; | ||
| import com.amazonaws.client.builder.AwsClientBuilder.EndpointConfiguration; | ||
| import com.amazonaws.services.s3.AmazonS3; | ||
| import com.amazonaws.services.s3.AmazonS3ClientBuilder; | ||
| import com.amazonaws.util.IOUtils; | ||
|
|
@@ -52,8 +55,12 @@ public class S3FileSystemIT { | |
| public void setUp() { | ||
| s3 = | ||
| AmazonS3ClientBuilder.standard() | ||
| .withEndpointConfiguration(localStack.getEndpointConfiguration(S3)) | ||
|
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Removed methods. |
||
| .withCredentials(localStack.getDefaultCredentialsProvider()) | ||
| .withEndpointConfiguration( | ||
| new EndpointConfiguration( | ||
| localStack.getEndpointOverride(S3).toString(), localStack.getRegion())) | ||
| .withCredentials( | ||
| new AWSStaticCredentialsProvider( | ||
| new BasicAWSCredentials(localStack.getAccessKey(), localStack.getSecretKey()))) | ||
| .build(); | ||
|
|
||
| s3.createBucket("flyteorg"); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Deprecated.