15
15
* define type of every page starting from first PP for 'TEST' table and up to total pages of DB,
16
16
and doing this for each subsequent page. Dictionary 'broken_pages_map' is used to store LIST of pages
17
17
for each encountered page type;
18
- * ENCRYPT database, see call of func 'run_encr_decr';
19
18
* close connection;
20
19
* open test DB file in binary mode for reading and writing, and:
21
20
** store previous content of .fdb in variable 'raw_db_content' (for further restore);
24
23
**** if page_type is POINTER_PAGE or IDX_ROOT_PAGE - do nothing (we can get problems if these pages are broken);
25
24
**** otherwise put 'garbage bytes' in each of these pages;
26
25
* close DB file
26
+ * ENCRYPT database, see call of func 'run_encr_decr';
27
27
* run 'gstat -e' and check its output for presense of several expected patterns:
28
28
** "Data pages: total encrypted, non-crypted"
29
29
** "Index pages: total encrypted, non-crypted"
@@ -451,12 +451,6 @@ def test_1(act: Action, capsys):
451
451
#
452
452
raw_db_content = act .db .db_path .read_bytes ()
453
453
454
-
455
- ############################################
456
- ### E N C R Y P T D A T A B A S E ###
457
- ############################################
458
- run_encr_decr (act , 'encrypt' , MAX_WAITING_ENCR_FINISH , capsys )
459
-
460
454
#################################################
461
455
### P U T G A R B A G E I N D B ###
462
456
#################################################
@@ -480,6 +474,11 @@ def test_1(act: Action, capsys):
480
474
w .write (garbage_bytes )
481
475
482
476
477
+ ############################################
478
+ ### E N C R Y P T D A T A B A S E ###
479
+ ############################################
480
+ run_encr_decr (act , 'encrypt' , MAX_WAITING_ENCR_FINISH , capsys )
481
+
483
482
#################################################
484
483
### P A R S E G S T A T O U T P U T ###
485
484
#################################################
0 commit comments