Skip to content

Commit c288f08

Browse files
ci: extend test matrix
Test with newer metrics and older cartridges to check previous patches.
1 parent b18760c commit c288f08

File tree

9 files changed

+52
-9
lines changed

9 files changed

+52
-9
lines changed

.github/workflows/test_on_push.yaml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,19 +15,27 @@ jobs:
1515
# old Tarantool versions that don't have "tuple-keydef"/"tuple-merger" support.
1616
tarantool-version: ["1.10.6", "1.10", "2.2", "2.3", "2.4", "2.5", "2.6", "2.7", "2.8", "2.10"]
1717
metrics-version: [""]
18+
cartridge-version: ["2.7.8"]
1819
remove-merger: [false]
1920
include:
2021
- tarantool-version: "1.10"
21-
metrics-version: "0.12.0"
22+
metrics-version: "0.16.0"
23+
cartridge-version: "2.7.8"
2224
- tarantool-version: "2.7"
2325
remove-merger: true
24-
- tarantool-version: "2.8"
26+
cartridge-version: "2.7.8"
27+
- tarantool-version: "2.10"
2528
metrics-version: "0.1.8"
26-
- tarantool-version: "2.8"
29+
cartridge-version: "2.7.8"
30+
- tarantool-version: "2.10"
2731
metrics-version: "0.10.0"
32+
cartridge-version: "2.7.8"
33+
- tarantool-version: "1.10"
34+
cartridge-version: "1.2.0"
2835
- tarantool-version: "2.10"
2936
coveralls: true
30-
metrics-version: "0.12.0"
37+
metrics-version: "0.16.0"
38+
cartridge-version: "2.7.8"
3139
fail-fast: false
3240
# Can't install older versions on 22.04,
3341
# see https://github.com/tarantool/setup-tarantool/issues/36
@@ -49,6 +57,8 @@ jobs:
4957
run: |
5058
tarantool --version
5159
./deps.sh
60+
env:
61+
CARTRIDGE_VERSION: ${{ matrix.cartridge-version }}
5262

5363
- name: Install metrics
5464
if: matrix.metrics-version != ''

deps.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ tarantoolctl rocks install "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2626
rm "${LUACOV_COVERALLS_ROCKSPEC_FILE}"
2727
rmdir "${TMPDIR}"
2828

29-
tarantoolctl rocks install cartridge 2.7.4
29+
CARTRIDGE_VERSION="${CARTRIDGE_VERSION:-2.7.8}"
30+
31+
tarantoolctl rocks install cartridge "$CARTRIDGE_VERSION"
3032
tarantoolctl rocks install ddl 1.6.2
3133
tarantoolctl rocks install migrations 0.4.2
3234

test/entrypoint/srv_ddl_reload.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -198,6 +198,11 @@ package.preload['customers-storage'] = function()
198198
}
199199
end
200200

201+
local roles_reload_allowed = nil
202+
if pcall(require, 'cartridge.hotreload') then
203+
roles_reload_allowed = true
204+
end
205+
201206
local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, {
202207
advertise_uri = 'localhost:3301',
203208
http_port = 8081,
@@ -207,7 +212,7 @@ local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, {
207212
'cartridge.roles.crud-router',
208213
'cartridge.roles.crud-storage',
209214
},
210-
roles_reload_allowed = true,
215+
roles_reload_allowed = roles_reload_allowed,
211216
})
212217

213218
if not ok then

test/entrypoint/srv_reload.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ local errors = require('errors')
88
local cartridge = require('cartridge')
99

1010
local roles_reload_allowed = nil
11-
if not os.getenv('TARANTOOL_FORBID_HOTRELOAD') then
11+
if pcall(require, 'cartridge.hotreload') then
1212
roles_reload_allowed = true
1313
end
1414

@@ -53,7 +53,7 @@ local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, {
5353
'cartridge.roles.crud-router',
5454
'cartridge.roles.crud-storage'
5555
},
56-
roles_reload_allowed = roles_reload_allowed
56+
roles_reload_allowed = roles_reload_allowed,
5757
})
5858

5959
if not ok then

test/entrypoint/srv_stats.lua

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ package.preload['customers-storage'] = function()
4444
}
4545
end
4646

47+
local roles_reload_allowed = nil
48+
if pcall(require, 'cartridge.hotreload') then
49+
roles_reload_allowed = true
50+
end
51+
4752
local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, {
4853
advertise_uri = 'localhost:3301',
4954
http_port = 8081,
@@ -53,7 +58,7 @@ local ok, err = errors.pcall('CartridgeCfgError', cartridge.cfg, {
5358
'cartridge.roles.crud-storage',
5459
'customers-storage',
5560
},
56-
roles_reload_allowed = true,
61+
roles_reload_allowed = roles_reload_allowed,
5762
})
5863

5964
if not ok then

test/integration/cfg_test.lua

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ group.test_package_reload_preserves_values = function(g)
7070
end
7171

7272
group.test_role_reload_preserves_values = function(g)
73+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
74+
"Cartridge roles reload is not supported")
75+
7376
local router = g.cluster:server('router')
7477

7578
-- Generate some non-default values.

test/integration/ddl_sharding_info_reload_test.lua

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,11 @@ for sharding_case_name, sharding_case in pairs(sharding_cases) do
303303
reload_case_name, sharding_case_name)
304304

305305
pgroup_storage[test_name] = function(g)
306+
t.skip_if(
307+
((reload_case == 'reload_roles')
308+
and pcall(require, 'cartridge.hotreload') == false),
309+
"Cartridge roles reload is not supported")
310+
306311
local storage = g.cluster:server('s1-master')
307312

308313
-- Init the cache.

test/integration/reload_test.lua

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,9 @@ g.after_each(function()
7777
end)
7878

7979
function g.test_router()
80+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
81+
"Cartridge roles reload is not supported")
82+
8083
g.highload_fiber = fiber.new(highload_loop, 'A')
8184

8285
g.cluster:retrying({}, function()
@@ -99,6 +102,9 @@ function g.test_router()
99102
end
100103

101104
function g.test_storage()
105+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
106+
"Cartridge roles reload is not supported")
107+
102108
g.highload_fiber = fiber.new(highload_loop, 'B')
103109

104110
g.cluster:retrying({}, function()

test/integration/stats_test.lua

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -772,6 +772,8 @@ pgroup.before_test(
772772
generate_stats)
773773

774774
pgroup.test_role_reload_do_not_reset_observations = function(g)
775+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
776+
"Cartridge roles reload is not supported")
775777
t.skip_if((g.params.args.driver == 'metrics')
776778
and helpers.is_metrics_0_12_0_or_older(),
777779
'See https://github.com/tarantool/metrics/issues/334')
@@ -1085,6 +1087,8 @@ group_metrics.before_test(
10851087
generate_stats)
10861088

10871089
group_metrics.test_role_reload_do_not_reset_metrics_observations = function(g)
1090+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
1091+
"Cartridge roles reload is not supported")
10881092
t.skip_if(helpers.is_metrics_0_12_0_or_older(),
10891093
"See https://github.com/tarantool/metrics/issues/334")
10901094

@@ -1124,6 +1128,9 @@ group_metrics.before_test(
11241128
prepare_select_data)
11251129

11261130
group_metrics.test_stats_changed_in_metrics_registry_after_role_reload = function(g)
1131+
t.skip_if(pcall(require, 'cartridge.hotreload') == false,
1132+
"Cartridge roles reload is not supported")
1133+
11271134
helpers.reload_roles(g.cluster:server('router'))
11281135
g.router:eval("crud = require('crud')")
11291136
check_updated_per_call(g)

0 commit comments

Comments
 (0)