Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit071f108

Browse files
committed
Merge branch 'master' into abs-backup-path
2 parents7a341bf +70d2f27 commit071f108

File tree

5 files changed

+18
-162
lines changed

5 files changed

+18
-162
lines changed

‎testgres/connection.py‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -104,13 +104,13 @@ def rollback(self):
104104
defexecute(self,query,*args):
105105
self.cursor.execute(query,args)
106106
try:
107-
res=self.cursor.fetchall()
108107
# pg8000 might return tuples
109-
ifisinstance(res,tuple):
110-
res= [tuple(t)fortinres]
111-
108+
res= [tuple(t)fortinself.cursor.fetchall()]
112109
returnres
113-
exceptException:
110+
exceptProgrammingError:
111+
returnNone
112+
exceptExceptionase:
113+
print("Error executing query: {}\n {}".format(repr(e),query))
114114
returnNone
115115

116116
defclose(self):

‎testgres/plugins/__init__.py‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22
frompg_probackup2.appimportProbackupApp,ProbackupException
33
frompg_probackup2.init_helpersimportinit_params
44
frompg_probackup2.storage.fs_backupimportFSTestBackupDir
5-
frompg_probackup2.storage.s3_backupimportS3TestBackupDir
65

76
__all__= [
8-
"ProbackupApp","ProbackupException","init_params","FSTestBackupDir","S3TestBackupDir","GDBobj"
7+
"ProbackupApp","ProbackupException","init_params","FSTestBackupDir","GDBobj"
98
]

‎testgres/plugins/pg_probackup2/pg_probackup2/app.py‎

Lines changed: 11 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@
44
importos
55
importre
66
importsubprocess
7-
importsys
87
importthreading
98
importtime
109
importunittest
@@ -37,6 +36,10 @@ def __str__(self):
3736
return'\n ERROR: {0}\n CMD: {1}'.format(repr(self.message),self.cmd)
3837

3938

39+
# Local backup control
40+
fs_backup_class=FSTestBackupDir
41+
42+
4043
classProbackupApp:
4144

4245
def__init__(self,test_class:unittest.TestCase,
@@ -189,15 +192,13 @@ def set_backup(self, instance, backup_id=False,
189192

190193
returnself.run(cmd+options,old_binary=old_binary,expect_error=expect_error)
191194

192-
defdel_instance(self,instance,old_binary=False,expect_error=False):
193-
194-
returnself.run([
195-
'del-instance',
196-
'--instance={0}'.format(instance),
197-
],
198-
old_binary=old_binary,
199-
expect_error=expect_error
200-
)
195+
defdel_instance(self,instance,options=None,old_binary=False,expect_error=False):
196+
ifoptionsisNone:
197+
options= []
198+
cmd= ['del-instance','--instance={0}'.format(instance)]+options
199+
returnself.run(cmd,
200+
old_binary=old_binary,
201+
expect_error=expect_error)
201202

202203
defbackup_node(
203204
self,instance,node,data_dir=False,
@@ -747,16 +748,5 @@ def load_backup_class(fs_type):
747748

748749
returngetattr(module,class_name)
749750

750-
751-
# Local or S3 backup
752-
fs_backup_class=FSTestBackupDir
753-
ifos.environ.get('PG_PROBACKUP_S3_TEST',os.environ.get('PROBACKUP_S3_TYPE_FULL_TEST')):
754-
root=os.path.realpath(os.path.join(os.path.dirname(__file__),'../..'))
755-
ifrootnotinsys.path:
756-
sys.path.append(root)
757-
frompg_probackup2.storage.s3_backupimportS3TestBackupDir
758-
759-
fs_backup_class=S3TestBackupDir
760-
761751
defbuild_backup_dir(self,backup='backup'):
762752
returnfs_backup_class(rel_path=self.rel_path,backup=backup)

‎testgres/plugins/pg_probackup2/pg_probackup2/init_helpers.py‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ def __init__(self):
5252
parts[0]=re.match(r'\d+',parts[0]).group()
5353
self.pg_config_version=reduce(lambdav,x:v*100+int(x),parts,0)
5454

55+
os.environ['LANGUAGE']='en'# set default locale language to en. All messages will use this locale
5556
test_env=os.environ.copy()
5657
envs_list= [
5758
'LANGUAGE',

‎testgres/plugins/pg_probackup2/pg_probackup2/storage/s3_backup.py‎

Lines changed: 0 additions & 134 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp