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

Usage of external testgres.os_ops and testgres.common#289

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

Open
dmitry-lipetsk wants to merge27 commits intopostgrespro:master
base:master
Choose a base branch
Loading
fromdmitry-lipetsk:D20250816_001--external_os_ops_v001
Open
Show file tree
Hide file tree
Changes from1 commit
Commits
Show all changes
27 commits
Select commitHold shift + click to select a range
be36713
[prepare] rename: testgres -> src
dmitry-lipetskAug 16, 2025
a36f485
Using an testgres.os_ops
dmitry-lipetskAug 16, 2025
594fdb5
setup.py is corrected [install_requires: testgres.os_ops]
dmitry-lipetskAug 16, 2025
4170212
cleanup
dmitry-lipetskSep 10, 2025
0d5d30f
cleanup (__init__.py, pg_probackup2)
dmitry-lipetskSep 10, 2025
54082f8
[rollback] src/__init__.py is restored
dmitry-lipetskSep 14, 2025
dd1c2a2
flake8
dmitry-lipetskSep 15, 2025
674026d
tests/requirements.txt is added
dmitry-lipetskSep 15, 2025
1a70df7
Usage of testgres.os_ops from postgrespro is begun
dmitry-lipetskSep 15, 2025
36acc38
GITHUB_TESTGRES_TOKEN_RO is used
dmitry-lipetskSep 22, 2025
5937003
setup.py is updated [secret]
dmitry-lipetskSep 22, 2025
cce238a
cleanup
dmitry-lipetskSep 23, 2025
801ae9a
Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskSep 23, 2025
e58698a
testgres.os_ops is open now
dmitry-lipetskSep 30, 2025
7f3c512
requirements.txt is updated
dmitry-lipetskSep 30, 2025
2266d99
cleanup [garbage]
dmitry-lipetskSep 30, 2025
e7dc9f3
[CI] Docker files are updated (git)
dmitry-lipetskSep 30, 2025
611943d
[CI] Docker file for Ubuntu 24.04 is fixed.
dmitry-lipetskOct 1, 2025
ebe8a08
[CI] Docker file for Ubuntu 24.04 is fixed [one more time]
dmitry-lipetskOct 1, 2025
f13d4ae
A problem with documentation is fixed [Sphinx]
dmitry-lipetskOct 1, 2025
6b408fb
fix: testgres/exceptions.py is deleted (again)
dmitry-lipetskNov 1, 2025
de73028
req: testgres.os_ops>=0.0.2,<1.0.0
dmitry-lipetskNov 1, 2025
5d3ec71
Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskNov 1, 2025
3084635
Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskNov 3, 2025
4219763
dockerfiles: git is not required to get python packages
dmitry-lipetskNov 3, 2025
2b44d99
Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskNov 3, 2025
a1037aa
Merge branch 'master' into D20250816_001--external_os_ops_v001
dmitry-lipetskNov 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Using an testgres.os_ops
src/operations is deleted.TestgresException, ExecUtilException, InvalidOperationException are gotten from testgres.operations.exceptions
  • Loading branch information
@dmitry-lipetsk
dmitry-lipetsk committedAug 16, 2025
commita36f48596bef8f53e4cef6c6a9df394970d8aaa7
4 changes: 3 additions & 1 deletioncreate_py_env.sh
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -6,4 +6,6 @@ pip install pytest
pip install pytest-xdist
pip install psycopg2
pip install six
pip install psutil
pip install psutil
pip install git+https://git.postgrespro.ru/d.kovalenko/preview-testgres.os_ops.git

6 changes: 5 additions & 1 deletionsetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,14 +22,18 @@
if sys.version_info < (3, 3):
install_requires.append("ipaddress")

install_requires.append(
"git+https://git.postgrespro.ru/d.kovalenko/preview-testgres.os_ops.git"
)

# Get contents of README file
with open('README.md', 'r') as f:
readme = f.read()

setup(
version='1.11.0',
name='testgres',
packages=['testgres', 'testgres.operations', 'testgres.impl'],
packages=['testgres', 'testgres.impl'],
package_dir={"testgres": "src"},
description='Testing utility for PostgreSQL and its extensions',
url='https://github.com/postgrespro/testgres',
Expand Down
6 changes: 3 additions & 3 deletionssrc/__init__.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -51,9 +51,9 @@

from .config import testgres_config

from .operations.os_ops import OsOperations, ConnectionParams
from .operations.local_ops import LocalOperations
from .operations.remote_ops import RemoteOperations
fromtestgres.operations.os_ops import OsOperations, ConnectionParams
fromtestgres.operations.local_ops import LocalOperations
fromtestgres.operations.remote_ops import RemoteOperations

__all__ = [
"get_new_node",
Expand Down
2 changes: 1 addition & 1 deletionsrc/backup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -13,7 +13,7 @@

from .exceptions import BackupException

from .operations.os_ops import OsOperations
fromtestgres.operations.os_ops import OsOperations

from .utils import \
get_bin_path2, \
Expand Down
4 changes: 2 additions & 2 deletionssrc/cache.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -16,8 +16,8 @@
get_bin_path2, \
execute_utility2

from .operations.local_ops import LocalOperations
from .operations.os_ops import OsOperations
fromtestgres.operations.local_ops import LocalOperations
fromtestgres.operations.os_ops import OsOperations


def cached_initdb(data_dir, logfile=None, params=None, os_ops: OsOperations = None, bin_path=None, cached=True):
Expand Down
4 changes: 2 additions & 2 deletionssrc/config.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -9,8 +9,8 @@
from contextlib import contextmanager

from .consts import TMP_CACHE
from .operations.os_ops import OsOperations
from .operations.local_ops import LocalOperations
fromtestgres.operations.os_ops import OsOperations
fromtestgres.operations.local_ops import LocalOperations

log_level = os.getenv('LOGGING_LEVEL', 'WARNING').upper()
log_format = os.getenv('LOGGING_FORMAT', '%(asctime)s - %(levelname)s - %(message)s')
Expand Down
52 changes: 5 additions & 47 deletionssrc/exceptions.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -2,57 +2,15 @@

import six


class TestgresException(Exception):
pass
from testgres.operations.exceptions import TestgresException
from testgres.operations.exceptions import ExecUtilException
from testgres.operations.exceptions import InvalidOperationException


class PortForException(TestgresException):
pass


@six.python_2_unicode_compatible
class ExecUtilException(TestgresException):
def __init__(self, message=None, command=None, exit_code=0, out=None, error=None):
super(ExecUtilException, self).__init__(message)

self.message = message
self.command = command
self.exit_code = exit_code
self.out = out
self.error = error

def __str__(self):
msg = []

if self.message:
msg.append(self.message)

if self.command:
command_s = ' '.join(self.command) if isinstance(self.command, list) else self.command,
msg.append(u'Command: {}'.format(command_s))

if self.exit_code:
msg.append(u'Exit code: {}'.format(self.exit_code))

if self.error:
msg.append(u'---- Error:\n{}'.format(self.error))

if self.out:
msg.append(u'---- Out:\n{}'.format(self.out))

return self.convert_and_join(msg)

@staticmethod
def convert_and_join(msg_list):
# Convert each byte element in the list to str
str_list = [six.text_type(item, 'utf-8') if isinstance(item, bytes) else six.text_type(item) for item in
msg_list]

# Join the list into a single string with the specified delimiter
return six.text_type('\n').join(str_list)


@six.python_2_unicode_compatible
class QueryException(TestgresException):
def __init__(self, message=None, query=None):
Expand DownExpand Up@@ -109,5 +67,5 @@ class BackupException(TestgresException):
pass


class InvalidOperationException(TestgresException):
pass
assert ExecUtilException.__name__ == "ExecUtilException"
assert InvalidOperationException.__name__ == "InvalidOperationException"
2 changes: 1 addition & 1 deletionsrc/impl/port_manager__generic.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
from..operations.os_ops import OsOperations
fromtestgres.operations.os_ops import OsOperations

from ..port_manager import PortManager
from ..exceptions import PortForException
Expand Down
6 changes: 3 additions & 3 deletionssrc/node.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -104,9 +104,9 @@

from .backup import NodeBackup

from .operations.os_ops import ConnectionParams
from .operations.os_ops import OsOperations
from .operations.local_ops import LocalOperations
fromtestgres.operations.os_ops import ConnectionParams
fromtestgres.operations.os_ops import OsOperations
fromtestgres.operations.local_ops import LocalOperations

InternalError = pglib.InternalError
ProgrammingError = pglib.ProgrammingError
Expand Down
Empty file removedsrc/operations/__init__.py
View file
Open in desktop
Empty file.
55 changes: 0 additions & 55 deletionssrc/operations/helpers.py
View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp