-
Notifications
You must be signed in to change notification settings - Fork 2
Add Tarantool 3 support and matrix tests #114
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 1 commit
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 |
---|---|---|
|
@@ -35,7 +35,8 @@ public final class TarantoolContainerClientHelper { | |
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
"\" > container-tmp.lua &&" + | ||
" tarantool container-tmp.lua"; | ||
private static final String SSL_COMMAND_TEMPLATE = | ||
"echo \" " + | ||
" print(require('yaml').encode( " + | ||
|
@@ -45,7 +46,8 @@ public final class TarantoolContainerClientHelper { | |
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
"\" > container-tmp.lua &&" + | ||
" tarantool container-tmp.lua"; | ||
Comment on lines
+51
to
+52
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. describe this in comments if you didn't |
||
private static final String COMMAND_TEMPLATE = "echo \" " + | ||
" print(require('yaml').encode( " + | ||
" {require('net.box').connect( " + | ||
|
@@ -54,7 +56,8 @@ public final class TarantoolContainerClientHelper { | |
" ):eval('%s')}) " + | ||
" ); " + | ||
" os.exit(); " + | ||
"\" | tarantool"; | ||
"\" > container-tmp.lua &&" + | ||
" tarantool container-tmp.lua"; | ||
|
||
TarantoolContainerClientHelper(TarantoolContainerOperations<? extends Container<?>> container) { | ||
this.container = container; | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
class TarantoolContainerIT { | ||
|
||
private static final String ENV_TARANTOOL_VERSION = "TARANTOOL_VERSION"; | ||
protected static final String tarantoolVersion = System.getenv(ENV_TARANTOOL_VERSION); | ||
|
||
private void addEnv(String key, String value) throws NoSuchFieldException, IllegalAccessException { | ||
Class<?> classOfMap = System.getenv().getClass(); | ||
|
@@ -73,31 +74,14 @@ public void testContainerWithParameters() throws Exception { | |
|
||
@Test | ||
public void testContainerWithTrueVersion() throws Exception { | ||
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. In matrix tests env var TARANTOOL_VERSION always set. So this test is redundant. |
||
final String version = "2.11.0"; | ||
addEnv(ENV_TARANTOOL_VERSION, version); | ||
|
||
List<String> result; | ||
try (TarantoolContainer container = new TarantoolContainer()) { | ||
container.start(); | ||
result = container.executeCommandDecoded("return _TARANTOOL"); | ||
} | ||
|
||
removeEnv(ENV_TARANTOOL_VERSION, version); | ||
assertEquals(1, result.size()); | ||
assertTrue(result.get(0).startsWith(version)); | ||
} | ||
|
||
@Test | ||
public void testContainerWithDefaultVersionVersion() throws Exception { | ||
|
||
List<String> result; | ||
try (TarantoolContainer container = new TarantoolContainer()) { | ||
container.start(); | ||
result = container.executeCommandDecoded("return _TARANTOOL"); | ||
} | ||
|
||
assertEquals(1, result.size()); | ||
assertTrue(result.get(0).startsWith(TarantoolContainer.DEFAULT_IMAGE_VERSION)); | ||
assertTrue(result.get(0).startsWith(String.valueOf(tarantoolVersion.charAt(0)))); | ||
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. What if these are not CI tests with predefined Tarantool versions, and there is no TARANTOOL_VERSION variable on the system on which the test runs? It seems that a NullPointerException is possible 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. Added if statement |
||
} | ||
|
||
@Test | ||
|
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 didn't you delete this job? It's duplicate as a part of matrix tests
Uh oh!
There was an error while loading. Please reload this page.
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.
I'v removed TrantoolCintainer classes from integration profile
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.
Got it. Then rename jobs, it's confusing because matrix tests are also integration tests
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.
tests-tarantool-container
tests-cartridge-container
tests-ee