Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: postgrespro/testgres
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 1.11.0
Choose a base ref
...
head repository: postgrespro/testgres
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 17 commits
  • 26 files changed
  • 2 contributors

Commits on Apr 24, 2025

  1. 2 Configuration menu
    Copy the full SHA
    6e5e4f5 View commit details
    Browse the repository at this point in the history

Commits on Apr 25, 2025

  1. [FIX] Tests include testgres by right way through import (#241)

    When we do not have root __init__.py tests must to import testgres through
    
    "import testgres"
    
    not through
    
    "from <relative_path> import testgres"
    dmitry-lipetsk authored Apr 25, 2025
    Configuration menu
    Copy the full SHA
    1a662f1 View commit details
    Browse the repository at this point in the history

Commits on Apr 28, 2025

  1. [#240] Using of node.psql with other host and port (#242)

    * [FIX] Tests include testgres by right way through import
    
    When we do not have root __init__.py tests must to import testgres through
    
    "import testgres"
    
    not through
    
    "from <relative_path> import testgres"
    
    * [#240] Using of node.psql with other host and port
    
    This patch adds the support of using other host and port in the following methods:
    
    - PostgresNode.psql (explicit new args: host and port)
    - PostgresNode.safe_psql (indirectly through **kwargs)
    
    It allows to run psql utility from one PostgreSQL instance to work with another one.
    
    If explicit host and port are not defined (are None), PostgresNode will use own ones.
    
    This patch closes #240.
    dmitry-lipetsk authored Apr 28, 2025
    Configuration menu
    Copy the full SHA
    94d7572 View commit details
    Browse the repository at this point in the history

Commits on May 1, 2025

  1. Testgres tests create log dir in exact place (#243)

    When we do not define TEST_CFG__LOG_DIR it is expected the testgres tests will create a log directory in a root of testgres project folder.
    
    We used config.rootpath for detect this folder in pytest_configure function.
    
    It was occurred that config.rootpath can point to another (unexpected) place.
    
    So we will use exact code to calculate testgres project folder (see TestStartupData.GetRootLogDir) to avid this problem.
    dmitry-lipetsk authored May 1, 2025
    Configuration menu
    Copy the full SHA
    2f550d8 View commit details
    Browse the repository at this point in the history

Commits on May 4, 2025

  1. [test] TestTestgresLocal.test_upgrade_node is corrected (#246)

    Let's "release" all our test nodes correctly.
    dmitry-lipetsk authored May 4, 2025
    Configuration menu
    Copy the full SHA
    5f8f5dd View commit details
    Browse the repository at this point in the history
  2. Releasing of reserved port in tests (#248)

    * [test] TestTestgresLocal.test_pg_ctl_wait_option is corrected
    
    Let's "release" all our test nodes correctly.
    
    * [test] TestTestgresLocal.test_simple_with_bin_dir is corrected
    
    Let's "release" all our test nodes correctly.
    dmitry-lipetsk authored May 4, 2025
    Configuration menu
    Copy the full SHA
    0b331e6 View commit details
    Browse the repository at this point in the history
  3. [#249] Fix of port number leak in NodeBackup::spawn_replica (#250)

    This patch has the following changes:
    
    1) It adds a new argument release_resources to PostgresNode::cleanup method. Default value is False.
    
    2) It fixes a port number leak in NodeBackup::spawn_replica through explicit call of PostgresNode::cleanup(release_resources=True).
    
    Closes #249.
    dmitry-lipetsk authored May 4, 2025
    Configuration menu
    Copy the full SHA
    c3b25b2 View commit details
    Browse the repository at this point in the history

Commits on May 5, 2025

  1. [Refactoring] Default port manager functions now use PortManager__Gen…

    …eric and LocalOperations (#251)
    
    * [Refactoring] Default port manager functions now use PortManager__Generic and LocalOperations
    
    This patch deletes a duplication of port manager code.
    
    Now utils.reserve_port and utils.release_port works through _old_port_manager - it is a global instance of PortManager__Generic that uses a global instance of LocalOperations.
    
    This commit is a part of work for #247.
    
    * [BUG FIX] PortManager__ThisHost::__new__ had MT-problem
    
    After MT-lock we must to check __class__.sm_single_instance again.
    
    Refactoring
     - PortManager__ThisHost::__new__ is replaced with an explicit PortManager__ThisHost::get_single_instance()
     - PortManager__ThisHost::__init__ is deleted
    dmitry-lipetsk authored May 5, 2025
    Configuration menu
    Copy the full SHA
    a683c65 View commit details
    Browse the repository at this point in the history
  2. [#244] PostgresNode now uses os_ops only (#245)

    This patch implements the proposal #244 - detach PostgresNode from ConnectionParams object.
    
    It will use os_ops object only.
    
    conn_params is saved but must be None. It will be removed in the future.
    dmitry-lipetsk authored May 5, 2025
    Configuration menu
    Copy the full SHA
    6972bfc View commit details
    Browse the repository at this point in the history

Commits on May 6, 2025

  1. LocalOperations::get_single_instance is added (#252)

    * LocalOperations::get_single_instance is added
    
    This patch forces testgres to use a single instance of LocalOperations that is created with default parameters.
    
    Note that, PortManager__ThisHost is used only when PostgresNode uses this single local_ops instance.
    dmitry-lipetsk authored May 6, 2025
    Configuration menu
    Copy the full SHA
    df4f545 View commit details
    Browse the repository at this point in the history
  2. New OsOperations methods: makedir, rmdir (#253)

    Signatures:
     def makedir(self, path: str)
     def rmdir(self, path: str)
    
    It is a part of work for #247.
    dmitry-lipetsk authored May 6, 2025
    Configuration menu
    Copy the full SHA
    a0a8506 View commit details
    Browse the repository at this point in the history
  3. OsOperations::get_tempdir() is added (#254)

    Signature:
     def get_tempdir(self) -> str
    dmitry-lipetsk authored May 6, 2025
    Configuration menu
    Copy the full SHA
    edd64db View commit details
    Browse the repository at this point in the history

Commits on May 7, 2025

  1. [#235] test_pg_ctl_wait_option detects a port conflict (#257)

    This patch must fix a problem in test_pg_ctl_wait_option when his PostgreSQL instance conflicts with another one.
    
    For this, we added two new things:
     - PostgresNodeLogReader
     - PostgresNodeUtils
    
    PostgresNodeLogReader reads server logs.
    
    PostgresNodeUtils provides an utility to detect a port conflict.
    
    PostgresNode::start also uses these new classes.
    dmitry-lipetsk authored May 7, 2025
    Configuration menu
    Copy the full SHA
    3bb59c6 View commit details
    Browse the repository at this point in the history
  2. Update README.md

    The version of supported Python is corrected.
    dmitry-lipetsk authored May 7, 2025
    Configuration menu
    Copy the full SHA
    4c6bb17 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    354de69 View commit details
    Browse the repository at this point in the history

Commits on May 12, 2025

  1. [#258] Problems in ProbackupTest and TestBasic(ProbackupTest) are fix…

    …ed (#259)
    
    * [#258] Declaration of ProbackupTest::pg_node is corrected
    
    ProbackupTest::pg_node is testgres.NodeApp, not testgres.PostgresNode.
    
    Asserts are added.
    
    * [#258] TestBasic::test_full_backup cleans node object
    
    Node cleanup is added.
    
    TODO: we should to stop node only and cleanup his data in conftest.
    dmitry-lipetsk authored May 12, 2025
    Configuration menu
    Copy the full SHA
    d48477d View commit details
    Browse the repository at this point in the history
  2. conftest is updated (#260)

    - the calls of logging.root.handle are handled (LogWrapper2)
    - critical errors are processed
    dmitry-lipetsk authored May 12, 2025
    Configuration menu
    Copy the full SHA
    0470d30 View commit details
    Browse the repository at this point in the history
Loading