Skip to content
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

Localstack support for HOSTNAME_EXTERNAL #1891

Merged
merged 10 commits into from
Nov 9, 2019
Merged

Conversation

rnorth
Copy link
Member

@rnorth rnorth commented Sep 19, 2019

Replacement for #1422

It looks like I can't push commits to @CauchyPeano's branch, so creating a new PR with his work and my changes.

@rnorth rnorth force-pushed the localstack-hostname-external branch from 135b1f6 to cb65299 Compare September 23, 2019 19:50
@rnorth rnorth changed the title Localstack support for HOSTNAME_EXTERNAL WIP: Localstack support for HOSTNAME_EXTERNAL Sep 23, 2019
@rnorth rnorth force-pushed the localstack-hostname-external branch from cb65299 to 4272996 Compare September 23, 2019 19:58
[*.java]
indent_style = space
indent_size = 4
# Never use star imports
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added this (IntelliJ-specific) configuration after I accidentally reset the import formatting style on GenericContainer. After this, we should converge towards consistent import style.

@@ -523,6 +523,7 @@ private void applyConfiguration(CreateContainerCmd createCommand) {
}

String[] envArray = env.entrySet().stream()
.filter(it -> it.getValue() != null)
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tangential change - noticed that we don't null check the environment variables we pass through, which seems likely to be a bug.

@rnorth rnorth changed the title WIP: Localstack support for HOSTNAME_EXTERNAL Localstack support for HOSTNAME_EXTERNAL Sep 23, 2019
@rnorth rnorth added this to the next milestone Sep 23, 2019
public class LocalstackContainerTest {

// without_network {
@ClassRule
Copy link
Member

@bsideup bsideup Sep 24, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please at least use nested test classes if we use the rules?
Starting multiple localstack containers at once may be very slow in some CIs

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't we even consider making this a plain test without rules?
Also considering our way forward, which would put rules into another module.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would very much be in favour of it :)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good point about the weight of these containers.

TBH I think I prefer the nested test class approach here; it's not a situation where try-with-resources is particularly elegant, and because these tests are excerpted for docs I'd like to keep the container creation style consistent.

I'll push a change with nested classes in a moment.

@rnorth rnorth requested a review from bsideup October 4, 2019 14:51
@bsideup bsideup modified the milestones: 1.12.3, next Oct 26, 2019
@rnorth rnorth self-assigned this Nov 1, 2019
@rnorth rnorth merged commit 3b308b8 into master Nov 9, 2019
@rnorth rnorth deleted the localstack-hostname-external branch November 9, 2019 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants