Skip to content
This repository was archived by the owner on Oct 29, 2023. It is now read-only.

Commit 054eab7

Browse files
committed
Replace file checks with whole manifest checks
Use the newly defined check_sandbox_manifest
1 parent 94376b6 commit 054eab7

File tree

14 files changed

+28
-237
lines changed

14 files changed

+28
-237
lines changed

CHANGELOG.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
## 1.69.1 04-Sep-2022
2+
3+
### BUGS FIXED
4+
5+
* Fix error in cleanup procedure for composite sandbox
6+
(The cleanup was not able to delete a non-empty directory)
7+
8+
### Code improvements
9+
10+
* Add testing command `check_sandbox_manifest`.
11+
* Improve TestMain with a check that prevents double buildUp or early tearDown
12+
113
## 1.69.0 27-Aug-2022
214

315
## NEW FEATURES

common/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.69.0
1+
1.69.1

ts/templates/feature/dd-expose-tables.tmpl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,7 @@ cleanup_at_end $sb_dir
2222

2323
# check files and ports
2424

25-
check_file $sb_dir start stop status clear
26-
check_file $sb_dir add_option connection.json init_db my.sandbox.cnf
27-
check_file $sb_dir sbdescription.json show_relaylog after_start connection.sql load_grants
28-
check_file $sb_dir replicate_from send_kill sysbench use
29-
check_file $sb_dir metadata restart show_binlog sysbench_ready wipe_and_restart
30-
check_file $sb_dir connection.conf grants.mysql my sb_include show_log test_sb
31-
check_file $sb_dir/data msandbox.err
25+
check_sandbox_manifest $sb_dir single
3226

3327
env required_ports=1
3428
check_ports $sb_dir $required_ports

ts/templates/feature/multiple.tmpl

Lines changed: 1 addition & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -12,34 +12,7 @@ stdout 'multiple directory installed in .*/sandboxes/multi_msb_{{.DbPathVer}}'
1212
exists $sb_dir
1313
cleanup_at_end $sb_dir
1414

15-
check_file $sb_dir metadata_all start_all sysbench_ready
16-
check_file $sb_dir clear_all n1 status_all
17-
check_file $sb_dir exec_all n2 replicate_from sbdescription.json stop_all test_sb_all
18-
check_file $sb_dir n3 restart_all send_kill_all sysbench use_all
19-
20-
check_file $sb_dir/node1 start stop status clear
21-
check_file $sb_dir/node1 add_option connection.json init_db my.sandbox.cnf
22-
check_file $sb_dir/node1 sbdescription.json show_relaylog after_start connection.sql load_grants
23-
check_file $sb_dir/node1 replicate_from send_kill sysbench use
24-
check_file $sb_dir/node1 metadata restart show_binlog sysbench_ready wipe_and_restart
25-
check_file $sb_dir/node1 connection.conf grants.mysql my sb_include show_log test_sb
26-
check_file $sb_dir/node1/data msandbox.err
27-
28-
check_file $sb_dir/node2 start stop status clear
29-
check_file $sb_dir/node2 add_option connection.json init_db my.sandbox.cnf
30-
check_file $sb_dir/node2 sbdescription.json show_relaylog after_start connection.sql load_grants
31-
check_file $sb_dir/node2 replicate_from send_kill sysbench use
32-
check_file $sb_dir/node2 metadata restart show_binlog sysbench_ready wipe_and_restart
33-
check_file $sb_dir/node2 connection.conf grants.mysql my sb_include show_log test_sb
34-
check_file $sb_dir/node2/data msandbox.err
35-
36-
check_file $sb_dir/node3 start stop status clear
37-
check_file $sb_dir/node3 add_option connection.json init_db my.sandbox.cnf
38-
check_file $sb_dir/node3 sbdescription.json show_relaylog after_start connection.sql load_grants
39-
check_file $sb_dir/node3 replicate_from send_kill sysbench use
40-
check_file $sb_dir/node3 metadata restart show_binlog sysbench_ready wipe_and_restart
41-
check_file $sb_dir/node3 connection.conf grants.mysql my sb_include show_log test_sb
42-
check_file $sb_dir/node3/data msandbox.err
15+
check_sandbox_manifest $sb_dir multiple
4316

4417
env required_ports=3
4518
[version_is_at_least:$db_version:8.0.0] env required_ports=6

ts/templates/feature/single-custom-credentials.tmpl

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,7 @@ cleanup_at_end $sb_dir
2323

2424
# check files and ports
2525

26-
check_file $sb_dir start stop status clear
27-
check_file $sb_dir add_option connection.json init_db my.sandbox.cnf
28-
check_file $sb_dir sbdescription.json show_relaylog after_start connection.sql load_grants
29-
check_file $sb_dir replicate_from send_kill sysbench use
30-
check_file $sb_dir metadata restart show_binlog sysbench_ready wipe_and_restart
31-
check_file $sb_dir connection.conf grants.mysql my sb_include show_log test_sb
32-
check_file $sb_dir/data msandbox.err
26+
check_sandbox_manifest $sb_dir single
3327

3428
env required_ports=1
3529
[version_is_at_least:$db_version:8.0.0] env required_ports=2

ts/templates/feature/single.tmpl

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,7 @@ cleanup_at_end $sb_dir
1818

1919
# check files and ports
2020

21-
check_exec $sb_dir start stop status clear
22-
check_exec $sb_dir add_option init_db
23-
check_exec $sb_dir show_relaylog after_start load_grants
24-
check_exec $sb_dir replicate_from send_kill sysbench use
25-
check_exec $sb_dir metadata restart show_binlog sysbench_ready wipe_and_restart
26-
check_exec $sb_dir my show_log test_sb
27-
28-
check_file $sb_dir connection.json connection_super_user.json connection_super_user.conf my.sandbox.cnf
29-
check_file $sb_dir sbdescription.json connection.sql
30-
check_file $sb_dir connection.conf grants.mysql sb_include
31-
check_file $sb_dir/data msandbox.err
32-
[version_is_at_least:$db_version:8.0.17] check_file $sb_dir clone_connection.sql
21+
check_sandbox_manifest $sb_dir single
3322

3423
env required_ports=1
3524
[version_is_at_least:$db_version:8.0.0] env required_ports=2

ts/templates/feature/use-admin.tmpl

Lines changed: 4 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ env db_port={{.DbIncreasedPort}}
1010
# deployment
1111

1212
env db_dir=--sandbox-directory=msb_{{.DbPathVer}}_admin
13-
exec dbdeployer deploy single $db_version --enable-admin-address $db_dir --port=$db_port --disable-mysqlx
13+
exec dbdeployer deploy single $db_version --enable-admin-address $db_dir --port=$db_port
1414
stdout 'Database installed in .*/sandboxes/msb_{{.DbPathVer}}_admin'
1515
stdout 'sandbox server started'
1616
! stderr .
@@ -20,15 +20,10 @@ cleanup_at_end $sb_dir
2020

2121
# check files and ports
2222

23-
check_file $sb_dir start stop status clear
24-
check_file $sb_dir add_option connection.json init_db my.sandbox.cnf
25-
check_file $sb_dir sbdescription.json show_relaylog after_start connection.sql load_grants
26-
check_file $sb_dir replicate_from send_kill sysbench use use_admin
27-
check_file $sb_dir metadata restart show_binlog sysbench_ready wipe_and_restart
28-
check_file $sb_dir connection.conf grants.mysql my sb_include show_log test_sb
29-
check_file $sb_dir/data msandbox.err
23+
check_sandbox_manifest $sb_dir single
24+
check_exec $sb_dir use_admin
3025

31-
env required_ports=2
26+
env required_ports=3
3227
check_ports $sb_dir $required_ports
3328

3429
exec $sb_dir/test_sb

ts/templates/group/group.tmpl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -32,24 +32,7 @@ stdout -count=9 'ONLINE'
3232
[version_is_at_least:{{.DbVersion}}:8.0.0] stdout -count=9 'PRIMARY'
3333
! stderr .
3434

35-
check_file $sb_dir check_nodes exec_all_slaves metadata_all start_all sysbench_ready use_all_masters
36-
check_file $sb_dir clear_all initialize_nodes n1 status_all test_replication use_all_slaves
37-
check_file $sb_dir exec_all n2 replicate_from sbdescription.json stop_all test_sb_all wipe_and_restart_all
38-
check_file $sb_dir exec_all_masters n3 restart_all send_kill_all sysbench use_all
39-
40-
check_file $sb_dir/node1 start stop status clear
41-
check_file $sb_dir/node1 add_option connection.json init_db my.sandbox.cnf
42-
check_file $sb_dir/node1 sbdescription.json show_relaylog after_start connection.sql load_grants
43-
check_file $sb_dir/node1 replicate_from send_kill sysbench use
44-
check_file $sb_dir/node1 metadata restart show_binlog sysbench_ready wipe_and_restart
45-
check_file $sb_dir/node1 connection.conf grants.mysql my sb_include show_log test_sb
46-
47-
check_file $sb_dir/node3 start stop status clear
48-
check_file $sb_dir/node3 add_option connection.json init_db my.sandbox.cnf
49-
check_file $sb_dir/node3 sbdescription.json show_relaylog after_start connection.sql load_grants
50-
check_file $sb_dir/node3 replicate_from send_kill sysbench use
51-
check_file $sb_dir/node3 metadata restart show_binlog sysbench_ready wipe_and_restart
52-
check_file $sb_dir/node3 connection.conf grants.mysql my sb_include show_log test_sb
35+
check_sandbox_manifest $sb_dir group
5336

5437
env required_ports=6
5538
[version_is_at_least:$db_version:8.0.0] env required_ports=9

ts/templates/group/group_sp.tmpl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -33,24 +33,7 @@ stdout -count=3 '[0-9]{8}-2222-2222-2222-222222222222'
3333
stdout -count=3 '[0-9]{8}-3333-3333-3333-333333333333'
3434
! stderr .
3535

36-
check_file $sb_dir check_nodes exec_all_slaves metadata_all start_all sysbench_ready use_all_masters
37-
check_file $sb_dir clear_all initialize_nodes n1 status_all test_replication use_all_slaves
38-
check_file $sb_dir exec_all n2 replicate_from sbdescription.json stop_all test_sb_all wipe_and_restart_all
39-
check_file $sb_dir exec_all_masters n3 restart_all send_kill_all sysbench use_all
40-
41-
check_file $sb_dir/node1 start stop status clear
42-
check_file $sb_dir/node1 add_option connection.json init_db my.sandbox.cnf
43-
check_file $sb_dir/node1 sbdescription.json show_relaylog after_start connection.sql load_grants
44-
check_file $sb_dir/node1 replicate_from send_kill sysbench use
45-
check_file $sb_dir/node1 metadata restart show_binlog sysbench_ready wipe_and_restart
46-
check_file $sb_dir/node1 connection.conf grants.mysql my sb_include show_log test_sb
47-
48-
check_file $sb_dir/node3 start stop status clear
49-
check_file $sb_dir/node3 add_option connection.json init_db my.sandbox.cnf
50-
check_file $sb_dir/node3 sbdescription.json show_relaylog after_start connection.sql load_grants
51-
check_file $sb_dir/node3 replicate_from send_kill sysbench use
52-
check_file $sb_dir/node3 metadata restart show_binlog sysbench_ready wipe_and_restart
53-
check_file $sb_dir/node3 connection.conf grants.mysql my sb_include show_log test_sb
36+
check_sandbox_manifest $sb_dir group
5437

5538
env required_ports=6
5639
[version_is_at_least:$db_version:8.0.0] env required_ports=9

ts/templates/multi-source/all-masters.tmpl

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -28,24 +28,7 @@ stdout -count=6 'Slave_IO_Running: Yes'
2828
stdout -count=6 'Slave_SQL_Running: Yes'
2929
! stderr .
3030

31-
check_file $sb_dir check_ms_nodes exec_all_slaves metadata_all start_all sysbench_ready use_all_masters
32-
check_file $sb_dir clear_all initialize_ms_nodes n1 status_all test_replication use_all_slaves
33-
check_file $sb_dir exec_all n2 replicate_from sbdescription.json stop_all test_sb_all wipe_and_restart_all
34-
check_file $sb_dir exec_all_masters n3 restart_all send_kill_all sysbench use_all
35-
36-
check_file $sb_dir/node1 start stop status clear
37-
check_file $sb_dir/node1 add_option connection.json init_db my.sandbox.cnf
38-
check_file $sb_dir/node1 sbdescription.json show_relaylog after_start connection.sql load_grants
39-
check_file $sb_dir/node1 replicate_from send_kill sysbench use
40-
check_file $sb_dir/node1 metadata restart show_binlog sysbench_ready wipe_and_restart
41-
check_file $sb_dir/node1 connection.conf grants.mysql my sb_include show_log test_sb
42-
43-
check_file $sb_dir/node3 start stop status clear
44-
check_file $sb_dir/node3 add_option connection.json init_db my.sandbox.cnf
45-
check_file $sb_dir/node3 sbdescription.json show_relaylog after_start connection.sql load_grants
46-
check_file $sb_dir/node3 replicate_from send_kill sysbench use
47-
check_file $sb_dir/node3 metadata restart show_binlog sysbench_ready wipe_and_restart
48-
check_file $sb_dir/node3 connection.conf grants.mysql my sb_include show_log test_sb
31+
check_sandbox_manifest $sb_dir multi_source
4932

5033
env required_ports=3
5134
[version_is_at_least:$db_version:8.0.0] env required_ports=6

0 commit comments

Comments
 (0)