-
Notifications
You must be signed in to change notification settings - Fork 1
Configure cluster from yaml #40
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
Configure cluster from yaml #40
Conversation
src/main/java/org/testcontainers/containers/CartridgeTopologyParser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/CartridgeTopologyParser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/CartridgeTopologyParser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/CartridgeTopologyParser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/CartridgeTopologyParser.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java
Outdated
Show resolved
Hide resolved
src/test/java/org/testcontainers/containers/TarantoolCartridgeContainerReplicasetsTest.java
Outdated
Show resolved
Hide resolved
src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java
Outdated
Show resolved
Hide resolved
throw new IllegalArgumentException("Topology configuration file must not be null or empty"); | ||
} | ||
String instances = topologyConfigurationFile.substring(topologyConfigurationFile.lastIndexOf('.') + 1); | ||
if (instances.equals("lua")) { |
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 condition is not needed here. Why not to set topologyConfigurationFile to yml ?
Maybe move this 'if' to setupTopology() ?
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.
Why not to set topologyConfigurationFile to yml ?
Because the user can transfer both yml and lua file whith topology to topologyConfigurationFile . And strategy we checkout depends type a file.
Maybe move this 'if' to setupTopology() ?
Because if we get lua file we must initialize the variable topologyConfigurationFile immediately in the constructor
src/main/java/org/testcontainers/containers/TarantoolCartridgeContainer.java
Outdated
Show resolved
Hide resolved
if (topologyConfigurationFile == null) { | ||
String runDirPath = null; | ||
try { | ||
Container.ExecResult envVariablesContainer = this.execInContainer("env"); |
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.
Why you are getting container env ?
see withArguments()
You can just use System.getenv() or default to ./tmp/run
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.
You can just use System.getenv() or default to ./tmp/run
I try use System.getenv() - this doesn't work (haven't need env).
Default to ./tmp/run - would not like use hardcore
see withArguments()
We maybe don't pass "ENV_TARANTOOL_RUNDIR" in Argumets. This is env setup to Dockerfile.
No description provided.