-
Notifications
You must be signed in to change notification settings - Fork 1
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
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,8 @@ public final class TarantoolContainerClientHelper { | |
"Executed script %s with exit code %d, stderr: \"%s\", stdout: \"%s\""; | ||
private static final String EXECUTE_COMMAND_ERROR_TEMPLATE = | ||
"Executed command \"%s\" with exit code %d, stderr: \"%s\", stdout: \"%s\""; | ||
// Generates bash command witch creates executable lua file with connection to required node | ||
// and evaluation of needed lua code | ||
private static final String MTLS_COMMAND_TEMPLATE = | ||
"echo \" " + | ||
" print(require('yaml').encode( " + | ||
|
@@ -35,7 +37,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 +48,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 +58,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; | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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,16 @@ 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"); | ||
if (tarantoolVersion != null) { | ||
assertTrue(result.get(0).startsWith(String.valueOf(tarantoolVersion.charAt(0)))); | ||
} | ||
|
||
assertEquals(1, result.size()); | ||
assertTrue(result.get(0).startsWith(TarantoolContainer.DEFAULT_IMAGE_VERSION)); | ||
} | ||
|
||
@Test | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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