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

Commit1e2255f

Browse files
authored
Merge pull request#91 from postgrespro/username-in-start-node
Change setting user in start_node
2 parents291bcec +fd11545 commit1e2255f

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

‎testgres/node.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -659,7 +659,7 @@ def get_control_data(self):
659659

660660
returnout_dict
661661

662-
defslow_start(self,replica=False,dbname='template1',username=default_username(),max_attempts=0):
662+
defslow_start(self,replica=False,dbname='template1',username=None,max_attempts=0):
663663
"""
664664
Starts the PostgreSQL instance and then polls the instance
665665
until it reaches the expected state (primary or replica). The state is checked
@@ -672,6 +672,8 @@ def slow_start(self, replica=False, dbname='template1', username=default_usernam
672672
If False, waits for the instance to be in primary mode. Default is False.
673673
max_attempts:
674674
"""
675+
ifnotusername:
676+
username=default_username()
675677
self.start()
676678

677679
ifreplica:

‎testgres/operations/local_ops.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ def set_env(self, var_name, var_val):
117117

118118
# Get environment variables
119119
defget_user(self):
120-
returngetpass.getuser()
120+
returnself.usernameorgetpass.getuser()
121121

122122
defget_name(self):
123123
returnos.name

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp