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

Commit23b00b1

Browse files
committed
tests: set env for run_binary
1 parent1c860ff commit23b00b1

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

‎tests/archive.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2030,7 +2030,9 @@ def test_archive_pg_receivexlog_partial_handling(self):
20302030
ifself.archive_compressandnode.major_version>=10:
20312031
cmdline+= ['-Z','1']
20322032

2033-
pg_receivexlog=self.run_binary(cmdline,asynchronous=True)
2033+
env=self.test_env
2034+
env["PGAPPNAME"]=app_name
2035+
pg_receivexlog=self.run_binary(cmdline,asynchronous=True,env)
20342036

20352037
ifpg_receivexlog.returncode:
20362038
self.assertFalse(

‎tests/helpers/ptrack_helpers.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,11 @@ def run_pb(self, command, asynchronous=False, gdb=False, old_binary=False, retur
779779
exceptsubprocess.CalledProcessErrorase:
780780
raiseProbackupException(e.output.decode('utf-8'),self.cmd)
781781

782-
defrun_binary(self,command,asynchronous=False):
782+
defrun_binary(self,command,asynchronous=False,env=None):
783+
784+
ifnotenv:
785+
env=self.test_env
786+
783787
ifself.verbose:
784788
print([' '.join(map(str,command))])
785789
try:
@@ -789,13 +793,13 @@ def run_binary(self, command, asynchronous=False):
789793
stdin=subprocess.PIPE,
790794
stdout=subprocess.PIPE,
791795
stderr=subprocess.PIPE,
792-
env=self.test_env
796+
env=env
793797
)
794798
else:
795799
self.output=subprocess.check_output(
796800
command,
797801
stderr=subprocess.STDOUT,
798-
env=self.test_env
802+
env=env
799803
).decode('utf-8')
800804
returnself.output
801805
exceptsubprocess.CalledProcessErrorase:

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp