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

Fix vault module, add new test with java client v2 #1791

Merged
merged 18 commits into from
Oct 30, 2019
Merged

Fix vault module, add new test with java client v2 #1791

merged 18 commits into from
Oct 30, 2019

Conversation

jetersen
Copy link
Contributor

resolves #1410

Using JSON and removing all the whitespace is one fix.

Perhaps we should add a second method in the that will call CLI using format=JSON and remove the whitespace 😓

@rnorth rnorth added this to the next milestone Sep 8, 2019
modules/vault/build.gradle Outdated Show resolved Hide resolved
}

public VaultContainer(String dockerImageName) {
super(dockerImageName);

setWaitStrategy(Wait.forHttp("/v1/secret/is_alive").forStatusCode(400));
Copy link
Member

Choose a reason for hiding this comment

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

400 seems like an odd status code to be waiting for. I can imagine how this could be perfectly correct, but perhaps this deserves at least a comment?

Does anyone recall the reason for this?

Copy link
Member

Choose a reason for hiding this comment

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

Wouldn't it make sense for this to be:

setWaitStrategy(Wait.forHttp("/v1/sys/health").forStatusCode(200));

(looking at https://www.vaultproject.io/api/system/health.html)

@rnorth
Copy link
Member

rnorth commented Oct 1, 2019

@Casz sorry for the late posting of comments. Would you still be willing to push this PR through?

* Move customizations to constructor to allow overrides
* Use a single startup attempt, as 1 should be sufficient
@rnorth
Copy link
Member

rnorth commented Oct 21, 2019

I took the liberty of updating the PR to reflect my comment - I hope this is OK.
This seems to be a reliable way to test the container readiness, as far as I can tell.

@bsideup, @kiview would one of you mind sanity checking my change?

Additionally I noticed a couple of little things that are being flagged by the IDE - but not related to this PR at all. I'll raise a separate PR to address those.

@jetersen
Copy link
Contributor Author

All good @rnorth THANKS! sorry for not getting back to you 😭

@rnorth
Copy link
Member

rnorth commented Oct 21, 2019

No probs @Casz!

@bsideup bsideup modified the milestones: 1.12.3, next Oct 26, 2019
@jetersen
Copy link
Contributor Author

LGTM 👍

@rnorth rnorth changed the title fix vault module, add new test with java client v2 Fix vault module, add new test with java client v2 Oct 30, 2019
@rnorth rnorth merged commit 9a31ab3 into testcontainers:master Oct 30, 2019
@rnorth
Copy link
Member

rnorth commented Oct 30, 2019

Thank you @Casz and @robfrank for your work on this! Finally merged 😅

@jetersen jetersen deleted the fix_vault branch October 30, 2019 14:54
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.

None yet

4 participants