Skip to content

Commit d596a19

Browse files
Oleg Chaplashkinylobankov
authored andcommitted
Add Tarantool 2.11 and 3.0 to tests workflow
We've switched to using the `tt` utility instead of `tarantoolctl` when testing on versions 3.0 [1]. We've also fixed the tests for `box.tuple`, so the interface of `new()` function has changed [2]. [1] tarantool/tarantool#9443 [2] https://github.com/tarantool/tarantool/releases/tag/3.0.0
1 parent 87c6df0 commit d596a19

File tree

3 files changed

+30
-25
lines changed

3 files changed

+30
-25
lines changed

.github/workflows/test_on_push.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,20 @@ jobs:
1111
github.event_name == 'pull_request' && github.event.pull_request.head.repo.owner.login != 'tarantool'
1212
strategy:
1313
matrix:
14-
tarantool: ["1.10", "2.6", "2.7", "2.8", "2.10"]
14+
tarantool: ["1.10", "2.6", "2.7", "2.8", "2.10", "2.11", "3.0"]
1515
fail-fast: false
1616
runs-on: [ubuntu-20.04]
1717
steps:
1818
- uses: actions/checkout@master
19-
- uses: tarantool/setup-tarantool@v1
19+
- uses: tarantool/setup-tarantool@v3
2020
with:
2121
tarantool-version: '${{ matrix.tarantool }}'
2222

23+
- name: Install tt utility
24+
run: |
25+
curl -L https://tarantool.io/GcTQaQl/release/2/installer.sh | bash
26+
sudo apt-get -y install tt
27+
2328
- name: Install requirements for community
2429
run: |
2530
cmake -S . -B build

CMakeLists.txt

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,10 @@ set_property(DIRECTORY APPEND PROPERTY ADDITIONAL_MAKE_CLEAN_FILES .rocks)
3939
add_custom_command(
4040
OUTPUT ${PROJECT_SOURCE_DIR}/.rocks
4141
DEPENDS ${PROJECT_NAME}-scm-1.rockspec
42-
COMMAND tarantoolctl rocks make ./${PROJECT_NAME}-scm-1.rockspec
43-
COMMAND tarantoolctl rocks install http 1.1.0
44-
COMMAND tarantoolctl rocks install luacheck 0.25.0
45-
COMMAND tarantoolctl rocks install luacov 0.13.0
42+
COMMAND tt rocks make ./${PROJECT_NAME}-scm-1.rockspec
43+
COMMAND tt rocks install http 1.1.0
44+
COMMAND tt rocks install luacheck 0.25.0
45+
COMMAND tt rocks install luacov 0.13.0
4646
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
4747
)
4848

@@ -51,7 +51,7 @@ add_custom_target(bootstrap DEPENDS ${PROJECT_SOURCE_DIR}/.rocks)
5151
add_custom_command(
5252
OUTPUT ${PROJECT_SOURCE_DIR}/.rocks/bin/ldoc
5353
DEPENDS bootstrap
54-
COMMAND tarantoolctl rocks install ldoc --server=http://rocks.moonscript.org
54+
COMMAND tt rocks install ldoc --server=http://rocks.moonscript.org
5555
WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}
5656
)
5757

test/luatest_test.lua

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,26 +40,26 @@ g.test_assert_is_box_null = function()
4040
end
4141

4242
g.test_assert_equals_tnt_tuples = function()
43-
t.assert_equals(box.tuple.new(1), box.tuple.new(1))
44-
t.assert_equals(box.tuple.new(1, 'a', box.NULL), box.tuple.new(1, 'a', box.NULL))
45-
t.assert_equals(box.tuple.new(1, {'a'}), box.tuple.new(1, {'a'}))
46-
t.assert_equals({box.tuple.new(1)}, {box.tuple.new(1)})
47-
t.assert_equals({box.tuple.new(1)}, {{1}})
48-
helper.assert_failure(t.assert_equals, box.tuple.new(1), box.tuple.new(2))
49-
50-
t.assert_not_equals(box.tuple.new(1), box.tuple.new(2))
51-
t.assert_not_equals(box.tuple.new(1, 'a', box.NULL, {}), box.tuple.new(1, 'a'))
52-
t.assert_not_equals(box.tuple.new(1, {'a'}), box.tuple.new(1, {'b'}))
53-
helper.assert_failure(t.assert_not_equals, box.tuple.new(1), box.tuple.new(1))
43+
t.assert_equals(box.tuple.new({1}), box.tuple.new({1}))
44+
t.assert_equals(box.tuple.new({1, 'a', box.NULL}), box.tuple.new({1, 'a', box.NULL}))
45+
t.assert_equals(box.tuple.new({1, {'a'}}), box.tuple.new({1, {'a'}}))
46+
t.assert_equals({box.tuple.new({1})}, {box.tuple.new({1})})
47+
t.assert_equals({box.tuple.new({1})}, {{1}})
48+
helper.assert_failure(t.assert_equals, box.tuple.new({1}), box.tuple.new({2}))
49+
50+
t.assert_not_equals(box.tuple.new({1}), box.tuple.new({2}))
51+
t.assert_not_equals(box.tuple.new({1, 'a', box.NULL, {}}), box.tuple.new({1, 'a'}))
52+
t.assert_not_equals(box.tuple.new({1, {'a'}}), box.tuple.new({1, {'b'}}))
53+
helper.assert_failure(t.assert_not_equals, box.tuple.new({1}), box.tuple.new({1}))
5454

5555
-- Check that other cdata values works fine.
5656
t.assert_equals(1ULL, 0ULL + 1)
5757
end
5858

59-
g.test_assert_items_equals_tnt_tuples = function()
60-
t.assert_items_equals({box.tuple.new(1)}, {box.tuple.new(1)})
59+
g.test_assert_items_equals_tnt_tuples_v3 = function()
60+
t.assert_items_equals({box.tuple.new({1})}, {box.tuple.new({1})})
6161
helper.assert_failure_contains('Item values of the tables are not identical',
62-
t.assert_items_equals, {box.tuple.new(1)}, {box.tuple.new(2)})
62+
t.assert_items_equals, {box.tuple.new({1})}, {box.tuple.new({2})})
6363
end
6464

6565
g.test_fail_if_tnt_specific = function()
@@ -115,14 +115,14 @@ g.test_assert_covers = function()
115115
subject({a = 1, b = 2, c = 3}, {a = 1, c = 3})
116116
subject({a = 1, b = 2, c = 3}, {a = 1, b = 2, c = 3})
117117
subject({a = box.NULL}, {a = box.NULL})
118-
subject({a = box.tuple.new(1)}, {a = box.tuple.new(1)})
118+
subject({a = box.tuple.new({1})}, {a = box.tuple.new({1})})
119119

120120
helper.assert_failure(subject, {a = 1, b = 2, c = 3}, {a = 2})
121121
helper.assert_failure(subject, {a = 1, b = 2, c = 3}, {a = 1, b = 1})
122122
helper.assert_failure(subject, {a = 1, b = 2, c = 3}, {a = 1, b = 2, c = 3, d = 4})
123123
helper.assert_failure(subject, {a = 1, b = 2, c = 3}, {d = 1})
124124
helper.assert_failure(subject, {a = nil}, {a = box.NULL})
125-
helper.assert_failure(subject, {a = box.tuple.new(1)}, {a = box.tuple.new(2)})
125+
helper.assert_failure(subject, {a = box.tuple.new({1})}, {a = box.tuple.new({2})})
126126
helper.assert_failure_contains('Argument 1 and 2 must be tables', subject, {a = 1, b = 2, c = 3}, nil)
127127
end
128128

@@ -144,9 +144,9 @@ end
144144

145145
g.test_assert_items_include = function()
146146
local subject = t.assert_items_include
147-
subject({1, box.tuple.new(1)}, {box.tuple.new(1)})
147+
subject({1, box.tuple.new({1})}, {box.tuple.new({1})})
148148

149-
helper.assert_failure(subject, {box.tuple.new(1)}, {box.tuple.new(2)})
149+
helper.assert_failure(subject, {box.tuple.new({1})}, {box.tuple.new({2})})
150150
end
151151

152152
g.test_assert_type = function()

0 commit comments

Comments
 (0)