- Notifications
You must be signed in to change notification settings - Fork35
Pbckp 152 multihost#78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Changes from1 commit
02c3375
1512afd
0d62e0e
8be1b3a
51f05de
f131088
4f38bd5
0da2ee2
2bc17f0
f9b6bdb
ac77ef7
b048041
e098b97
1c405ef
8c373e6
72e6d5d
2c2d2c5
1b4f74a
2e916df
0528541
089ab9b
190d084
0c26f77
0796bc4
0f14034
12aa7ba
4e7f4b0
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
- Loading branch information
Uh oh!
There was an error while loading.Please reload this page.
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -13,7 +13,8 @@ | ||
"psutil", | ||
"packaging", | ||
"paramiko", | ||
"fabric", | ||
"sshtunnel" | ||
] | ||
# Add compatibility enum class | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -7,6 +7,7 @@ | ||
from contextlib import contextmanager | ||
from .consts import TMP_CACHE | ||
from .operations.os_ops import OsOperations | ||
from .operations.local_ops import LocalOperations | ||
@@ -121,6 +122,11 @@ def copy(self): | ||
return copy.copy(self) | ||
@staticmethod | ||
def set_os_ops(os_ops: OsOperations): | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Didn't found calls to test_os_ops() with RemoteOperations. Is it as expected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It is in test_simple_remote.py:59 | ||
testgres_config.os_ops = os_ops | ||
testgres_config.cached_initdb_dir = os_ops.mkdtemp(prefix=TMP_CACHE) | ||
# cached dirs to be removed | ||
cached_initdb_dirs = set() | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -2,7 +2,7 @@ | ||
import struct | ||
import uuid | ||
from .config importtestgres_config as tconf | ||
def default_dbname(): | ||
@@ -13,11 +13,11 @@ def default_dbname(): | ||
return 'postgres' | ||
def default_username(): | ||
""" | ||
Return default username (current user). | ||
""" | ||
returntconf.os_ops.get_user() | ||
def generate_app_name(): | ||
@@ -28,7 +28,7 @@ def generate_app_name(): | ||
return 'testgres-{}'.format(str(uuid.uuid4())) | ||
def generate_system_id(): | ||
""" | ||
Generate a new 64-bit unique system identifier for node. | ||
""" | ||
@@ -43,7 +43,7 @@ def generate_system_id(os_ops=LocalOperations()): | ||
system_id = 0 | ||
system_id |= (secs << 32) | ||
system_id |= (usecs << 12) | ||
system_id |= (tconf.os_ops.get_pid() & 0xFFF) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. no override tconf.os_ops for RemoteOperations. is it as expected? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. It's setting up in testgres_config.set_os_ops(os_ops=os_ops) and inside PostgresNode testgres_config.os_ops = self.os_ops | ||
# pack ULL in native byte order | ||
return struct.pack('=Q', system_id) |
Uh oh!
There was an error while loading.Please reload this page.