@@ -29,15 +29,11 @@ def test_backup_modes_archive(self):
29
29
self .set_archiving (backup_dir , 'node' , node )
30
30
node .start ()
31
31
32
- # full backup mode
33
- # with open(path.join(node.logs_dir, "backup_full.log"), "wb") as backup_log:
34
- # backup_log.write(self.backup_node(node, options=["--verbose"]))
35
-
36
32
backup_id = self .backup_node (backup_dir , 'node' , node )
37
33
show_backup = self .show_pb (backup_dir , 'node' )[0 ]
38
34
39
- self .assertEqual (show_backup ['Status ' ], "OK" )
40
- self .assertEqual (show_backup ['Mode ' ], "FULL" )
35
+ self .assertEqual (show_backup ['status ' ], "OK" )
36
+ self .assertEqual (show_backup ['backup-mode ' ], "FULL" )
41
37
42
38
# postmaster.pid and postmaster.opts shouldn't be copied
43
39
excluded = True
@@ -61,29 +57,29 @@ def test_backup_modes_archive(self):
61
57
62
58
# print self.show_pb(node)
63
59
show_backup = self .show_pb (backup_dir , 'node' )[1 ]
64
- self .assertEqual (show_backup ['Status ' ], "OK" )
65
- self .assertEqual (show_backup ['Mode ' ], "PAGE" )
60
+ self .assertEqual (show_backup ['status ' ], "OK" )
61
+ self .assertEqual (show_backup ['backup-mode ' ], "PAGE" )
66
62
67
63
# Check parent backup
68
64
self .assertEqual (
69
65
backup_id ,
70
66
self .show_pb (
71
67
backup_dir , 'node' ,
72
- backup_id = show_backup ['ID ' ])["parent-backup-id" ])
68
+ backup_id = show_backup ['id ' ])["parent-backup-id" ])
73
69
74
70
# ptrack backup mode
75
71
self .backup_node (backup_dir , 'node' , node , backup_type = "ptrack" )
76
72
77
73
show_backup = self .show_pb (backup_dir , 'node' )[2 ]
78
- self .assertEqual (show_backup ['Status ' ], "OK" )
79
- self .assertEqual (show_backup ['Mode ' ], "PTRACK" )
74
+ self .assertEqual (show_backup ['status ' ], "OK" )
75
+ self .assertEqual (show_backup ['backup-mode ' ], "PTRACK" )
80
76
81
77
# Check parent backup
82
78
self .assertEqual (
83
79
page_backup_id ,
84
80
self .show_pb (
85
81
backup_dir , 'node' ,
86
- backup_id = show_backup ['ID ' ])["parent-backup-id" ])
82
+ backup_id = show_backup ['id ' ])["parent-backup-id" ])
87
83
88
84
# Clean after yourself
89
85
self .del_test_dir (module_name , fname )
@@ -106,7 +102,7 @@ def test_smooth_checkpoint(self):
106
102
self .backup_node (
107
103
backup_dir , 'node' , node ,
108
104
options = ["-C" ])
109
- self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['Status ' ], "OK" )
105
+ self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['status ' ], "OK" )
110
106
node .stop ()
111
107
112
108
# Clean after yourself
@@ -162,7 +158,7 @@ def test_incremental_backup_without_full(self):
162
158
repr (e .message ), self .cmd ))
163
159
164
160
self .assertEqual (
165
- self .show_pb (backup_dir , 'node' )[0 ]['Status ' ],
161
+ self .show_pb (backup_dir , 'node' )[0 ]['status ' ],
166
162
"ERROR" )
167
163
168
164
# Clean after yourself
@@ -227,7 +223,7 @@ def test_incremental_backup_corrupt_full(self):
227
223
self .assertEqual (
228
224
self .show_pb (backup_dir , 'node' , backup_id )['status' ], "CORRUPT" )
229
225
self .assertEqual (
230
- self .show_pb (backup_dir , 'node' )[1 ]['Status ' ], "ERROR" )
226
+ self .show_pb (backup_dir , 'node' )[1 ]['status ' ], "ERROR" )
231
227
232
228
# Clean after yourself
233
229
self .del_test_dir (module_name , fname )
@@ -250,12 +246,12 @@ def test_ptrack_threads(self):
250
246
self .backup_node (
251
247
backup_dir , 'node' , node ,
252
248
backup_type = "full" , options = ["-j" , "4" ])
253
- self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['Status ' ], "OK" )
249
+ self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['status ' ], "OK" )
254
250
255
251
self .backup_node (
256
252
backup_dir , 'node' , node ,
257
253
backup_type = "ptrack" , options = ["-j" , "4" ])
258
- self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['Status ' ], "OK" )
254
+ self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['status ' ], "OK" )
259
255
260
256
# Clean after yourself
261
257
self .del_test_dir (module_name , fname )
@@ -282,11 +278,11 @@ def test_ptrack_threads_stream(self):
282
278
backup_dir , 'node' , node , backup_type = "full" ,
283
279
options = ["-j" , "4" , "--stream" ])
284
280
285
- self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['Status ' ], "OK" )
281
+ self .assertEqual (self .show_pb (backup_dir , 'node' )[0 ]['status ' ], "OK" )
286
282
self .backup_node (
287
283
backup_dir , 'node' , node ,
288
284
backup_type = "ptrack" , options = ["-j" , "4" , "--stream" ])
289
- self .assertEqual (self .show_pb (backup_dir , 'node' )[1 ]['Status ' ], "OK" )
285
+ self .assertEqual (self .show_pb (backup_dir , 'node' )[1 ]['status ' ], "OK" )
290
286
291
287
# Clean after yourself
292
288
self .del_test_dir (module_name , fname )
@@ -342,7 +338,7 @@ def test_page_corruption_heal_via_ptrack_1(self):
342
338
f .close
343
339
344
340
self .assertTrue (
345
- self .show_pb (backup_dir , 'node' )[1 ]['Status ' ] == 'OK' ,
341
+ self .show_pb (backup_dir , 'node' )[1 ]['status ' ] == 'OK' ,
346
342
"Backup Status should be OK" )
347
343
348
344
# Clean after yourself
@@ -415,7 +411,7 @@ def test_page_corruption_heal_via_ptrack_2(self):
415
411
repr (e .message ), self .cmd ))
416
412
417
413
self .assertTrue (
418
- self .show_pb (backup_dir , 'node' )[1 ]['Status ' ] == 'ERROR' ,
414
+ self .show_pb (backup_dir , 'node' )[1 ]['status ' ] == 'ERROR' ,
419
415
"Backup Status should be ERROR" )
420
416
421
417
# Clean after yourself
0 commit comments