- Notifications
You must be signed in to change notification settings - Fork37
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
02c33751512afd0d62e0e8be1b3a51f05def1310884f38bd50da2ee22bc17f0f9b6bdbac77ef7b048041e098b971c405ef8c373e672e6d5d2c2d2c51b4f74a2e916df0528541089ab9b190d0840c26f770796bc40f1403412aa7ba4e7f4b0File 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? ContributorAuthor 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? ContributorAuthor 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.