-
Notifications
You must be signed in to change notification settings - Fork 315
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
Add param of withBindVolumn for EtcdClusterExtension #1092
Conversation
Signed-off-by: Lan Liang <[email protected]>
6065c52
to
f3de39a
Compare
It would be nice to understand why the volume mount fails, ideally this should not be something you should be able to disable as it may be required by the jetcd container |
Run unit test on windows, and use remote docker container from linux, the voulme is
Absolutely right, so still create volum for etcd test container by default, User need to use |
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.
some minor changes are needed
@@ -46,6 +46,7 @@ public static class Builder { | |||
private boolean ssl = false; | |||
private List<String> additionalArgs; | |||
private Network network; | |||
private boolean bindVolumn = true; |
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.
- the default value is usually set in the constructor
- maybe use a better name that describe the intention i.e. bindDataDirectory
@@ -203,7 +211,9 @@ public void start() { | |||
@Override | |||
public void close() { | |||
super.close(); | |||
deleteDataDirectory(dataDirectory); | |||
if(bindVolumn) { |
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.
this check may not be needed as if the data directory os null, then the method won't do anything
@@ -79,6 +80,11 @@ public EtcdContainer withClusterToken(String clusterToken) { | |||
this.clusterToken = clusterToken; | |||
return self(); | |||
} | |||
|
|||
public EtcdContainer withBindVolumn(boolean bindVolumn){ | |||
this.bindVolumn=bindVolumn; |
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.
probably a checkstyle violation, please reformat the code
@@ -57,6 +58,7 @@ public EtcdClusterImpl( | |||
.withClusterToken(clusterName) | |||
.withSll(ssl) | |||
.withAdditionalArgs(additionalArgs) | |||
.withBindVolumn(bindVolumn) |
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.
must be formatted
This PR is stale because it has been open 60 days with no activity. |
@liangyuanpeng can you fix the findings ? |
@lburgazzoli is this PR up to date? I opened a #1123, I guess they are almost identical. I have all code formatter + tests there. This feature is very important to me. Thanks! |
Merged, THX ! |
Done in #1123 |
I use remote docker for testcontainer to run unit test and i just got the error:
So i add param of bindVolumn for this case that do not need volumn.