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 merge20 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 fromall commits
Commits
Show all changes
20 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
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
3 changes: 3 additions & 0 deletionsDockerfile--std-all.tmpl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@ ENV PYTHON_VERSION=3
# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} as final

# it is required for getting external packages
RUN apk add --no-cache git

#RUN apk add --no-cache mc

# Full version of "ps" command
Expand Down
3 changes: 3 additions & 0 deletionsDockerfile--std.tmpl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -12,6 +12,9 @@ ENV PYTHON_VERSION=3
# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} as final

# it is required for getting external packages
RUN apk add --no-cache git

ENV LANG=C.UTF-8

ADD . /pg/testgres
Expand Down
3 changes: 3 additions & 0 deletionsDockerfile--ubuntu_24_04.tmpl
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -47,6 +47,9 @@ ENV PYTHON_VERSION=3
# --------------------------------------------- final
FROM base2_with_python-${PYTHON_VERSION} as final

# it is required for getting external packages
RUN apt install -y git

ADD . /pg/testgres
WORKDIR /pg/testgres
RUN chown -R postgres /pg
Expand Down
1 change: 1 addition & 0 deletionsdocs/Makefile
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -17,4 +17,5 @@ help:
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@pip install --force-reinstall ..
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
12 changes: 10 additions & 2 deletionsdocs/source/conf.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -14,11 +14,19 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
import testgres

assert testgres.__path__ is not None
assert len(testgres.__path__) == 1
assert type(testgres.__path__[0] == str) # noqa: E721
p = os.path.dirname(testgres.__path__[0])
assert type(p) == str # noqa: E721
sys.path.insert(0, os.path.abspath(p))

# -- Project information -----------------------------------------------------

project = u'testgres'
package_name = u'testgres'
copyright = u'2016-2023, Postgres Professional'
author = u'Postgres Professional'

Expand DownExpand Up@@ -55,7 +63,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language =None
language ="en"

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down
7 changes: 6 additions & 1 deletionsetup.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -22,14 +22,19 @@
if sys.version_info < (3, 3):
install_requires.append("ipaddress")

install_requires.append(
"testgres.os_ops @ git+https://github.com/postgrespro/testgres.os_ops.git"
)

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

setup(
version='1.11.1',
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',
long_description=readme,
Expand Down
6 changes: 3 additions & 3 deletionstestgres/__init__.py → src/__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
View file
Open in desktop
File renamed without changes.
2 changes: 1 addition & 1 deletiontestgres/backup.py → src/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 deletionstestgres/cache.py → src/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 deletionstestgres/config.py → src/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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
71 changes: 71 additions & 0 deletionssrc/exceptions.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
# coding: utf-8

import six

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 QueryException(TestgresException):
def __init__(self, message=None, query=None):
super(QueryException, self).__init__(message)

self.message = message
self.query = query

def __str__(self):
msg = []

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

if self.query:
msg.append(u'Query: {}'.format(self.query))

return six.text_type('\n').join(msg)


class TimeoutException(QueryException):
pass


class CatchUpException(QueryException):
pass


@six.python_2_unicode_compatible
class StartNodeException(TestgresException):
def __init__(self, message=None, files=None):
super(StartNodeException, self).__init__(message)

self.message = message
self.files = files

def __str__(self):
msg = []

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

for f, lines in self.files or []:
msg.append(u'{}\n----\n{}\n'.format(f, lines))

return six.text_type('\n').join(msg)


class InitNodeException(TestgresException):
pass


class BackupException(TestgresException):
pass


assert ExecUtilException.__name__ == "ExecUtilException"
assert InvalidOperationException.__name__ == "InvalidOperationException"
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
File renamed without changes.
6 changes: 3 additions & 3 deletionstestgres/node.py → src/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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
8 changes: 4 additions & 4 deletionstestgres/utils.py → src/utils.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -15,10 +15,10 @@

from .exceptions import ExecUtilException
from .config import testgres_config as tconf
from .operations.os_ops import OsOperations
from .operations.remote_ops import RemoteOperations
from .operations.local_ops import LocalOperations
from .operations.helpers import Helpers as OsHelpers
fromtestgres.operations.os_ops import OsOperations
fromtestgres.operations.remote_ops import RemoteOperations
fromtestgres.operations.local_ops import LocalOperations
fromtestgres.operations.helpers import Helpers as OsHelpers

from .impl.port_manager__generic import PortManager__Generic

Expand Down
View file
Open in desktop
Empty file.
55 changes: 0 additions & 55 deletionstestgres/operations/helpers.py
View file
Open in desktop

This file was deleted.

Loading

[8]ページ先頭

©2009-2025 Movatter.jp