testgres 1.14.1__tar.gz → 1.14.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (46) hide show
  1. {testgres-1.14.1/testgres.egg-info → testgres-1.14.2}/PKG-INFO +1 -1
  2. {testgres-1.14.1 → testgres-1.14.2}/src/__init__.py +1 -1
  3. {testgres-1.14.1 → testgres-1.14.2}/src/node_app.py +5 -4
  4. {testgres-1.14.1 → testgres-1.14.2/testgres.egg-info}/PKG-INFO +1 -1
  5. {testgres-1.14.1 → testgres-1.14.2}/tests/test_testgres_common.py +52 -1
  6. {testgres-1.14.1 → testgres-1.14.2}/LICENSE +0 -0
  7. {testgres-1.14.1 → testgres-1.14.2}/README.md +0 -0
  8. {testgres-1.14.1 → testgres-1.14.2}/pyproject.toml +0 -0
  9. {testgres-1.14.1 → testgres-1.14.2}/setup.cfg +0 -0
  10. {testgres-1.14.1 → testgres-1.14.2}/src/api.py +0 -0
  11. {testgres-1.14.1 → testgres-1.14.2}/src/backup.py +0 -0
  12. {testgres-1.14.1 → testgres-1.14.2}/src/cache.py +0 -0
  13. {testgres-1.14.1 → testgres-1.14.2}/src/config.py +0 -0
  14. {testgres-1.14.1 → testgres-1.14.2}/src/connection.py +0 -0
  15. {testgres-1.14.1 → testgres-1.14.2}/src/consts.py +0 -0
  16. {testgres-1.14.1 → testgres-1.14.2}/src/decorators.py +0 -0
  17. {testgres-1.14.1 → testgres-1.14.2}/src/defaults.py +0 -0
  18. {testgres-1.14.1 → testgres-1.14.2}/src/enums.py +0 -0
  19. {testgres-1.14.1 → testgres-1.14.2}/src/exceptions.py +0 -0
  20. {testgres-1.14.1 → testgres-1.14.2}/src/impl/internal_utils.py +0 -0
  21. {testgres-1.14.1 → testgres-1.14.2}/src/impl/platforms/internal_platform_utils.py +0 -0
  22. {testgres-1.14.1 → testgres-1.14.2}/src/impl/platforms/internal_platform_utils_factory.py +0 -0
  23. {testgres-1.14.1 → testgres-1.14.2}/src/impl/platforms/linux/internal_platform_utils.py +0 -0
  24. {testgres-1.14.1 → testgres-1.14.2}/src/impl/platforms/win32/internal_platform_utils.py +0 -0
  25. {testgres-1.14.1 → testgres-1.14.2}/src/impl/port_manager__generic.py +0 -0
  26. {testgres-1.14.1 → testgres-1.14.2}/src/impl/port_manager__this_host.py +0 -0
  27. {testgres-1.14.1 → testgres-1.14.2}/src/logger.py +0 -0
  28. {testgres-1.14.1 → testgres-1.14.2}/src/node.py +0 -0
  29. {testgres-1.14.1 → testgres-1.14.2}/src/port_manager.py +0 -0
  30. {testgres-1.14.1 → testgres-1.14.2}/src/pubsub.py +0 -0
  31. {testgres-1.14.1 → testgres-1.14.2}/src/raise_error.py +0 -0
  32. {testgres-1.14.1 → testgres-1.14.2}/src/standby.py +0 -0
  33. {testgres-1.14.1 → testgres-1.14.2}/src/utils.py +0 -0
  34. {testgres-1.14.1 → testgres-1.14.2}/testgres.egg-info/SOURCES.txt +0 -0
  35. {testgres-1.14.1 → testgres-1.14.2}/testgres.egg-info/dependency_links.txt +0 -0
  36. {testgres-1.14.1 → testgres-1.14.2}/testgres.egg-info/requires.txt +0 -0
  37. {testgres-1.14.1 → testgres-1.14.2}/testgres.egg-info/top_level.txt +0 -0
  38. {testgres-1.14.1 → testgres-1.14.2}/tests/test_api.py +0 -0
  39. {testgres-1.14.1 → testgres-1.14.2}/tests/test_config.py +0 -0
  40. {testgres-1.14.1 → testgres-1.14.2}/tests/test_os_ops_common.py +0 -0
  41. {testgres-1.14.1 → testgres-1.14.2}/tests/test_os_ops_local.py +0 -0
  42. {testgres-1.14.1 → testgres-1.14.2}/tests/test_os_ops_remote.py +0 -0
  43. {testgres-1.14.1 → testgres-1.14.2}/tests/test_raise_error.py +0 -0
  44. {testgres-1.14.1 → testgres-1.14.2}/tests/test_testgres_local.py +0 -0
  45. {testgres-1.14.1 → testgres-1.14.2}/tests/test_testgres_remote.py +0 -0
  46. {testgres-1.14.1 → testgres-1.14.2}/tests/test_utils.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testgres
3
- Version: 1.14.1
3
+ Version: 1.14.2
4
4
  Summary: Testing utility for PostgreSQL and its extensions
5
5
  Author-email: Postgres Professional <testgres@postgrespro.ru>
6
6
  License: PostgreSQL
@@ -56,7 +56,7 @@ from testgres.operations.os_ops import OsOperations, ConnectionParams
56
56
  from testgres.operations.local_ops import LocalOperations
57
57
  from testgres.operations.remote_ops import RemoteOperations
58
58
 
59
- __version__ = "1.14.1"
59
+ __version__ = "1.14.2"
60
60
 
61
61
  __all__ = [
62
62
  "get_new_node",
@@ -99,7 +99,7 @@ class NodeApp:
99
99
  port=port,
100
100
  bin_dir=bin_dir,
101
101
  os_ops=self._os_ops,
102
- port_manager=port_manager
102
+ port_manager=port_manager,
103
103
  )
104
104
 
105
105
  try:
@@ -150,7 +150,10 @@ class NodeApp:
150
150
 
151
151
  node.init(
152
152
  initdb_params=final_initdb_params,
153
- allow_streaming=set_replication
153
+ # params for node.default_conf
154
+ fsync=False,
155
+ allow_streaming=set_replication,
156
+ log_statement="none",
154
157
  )
155
158
 
156
159
  # set major version
@@ -164,11 +167,9 @@ class NodeApp:
164
167
  options = {
165
168
  'max_connections': 100,
166
169
  'shared_buffers': '10MB',
167
- 'fsync': 'off',
168
170
  'wal_level': 'logical',
169
171
  'hot_standby': 'off',
170
172
  'log_line_prefix': '%t [%p]: [%l-1] ',
171
- 'log_statement': 'none',
172
173
  'log_duration': 'on',
173
174
  'log_min_duration_statement': 0,
174
175
  'log_connections': 'on',
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: testgres
3
- Version: 1.14.1
3
+ Version: 1.14.2
4
4
  Summary: Testing utility for PostgreSQL and its extensions
5
5
  Author-email: Postgres Professional <testgres@postgrespro.ru>
6
6
  License: PostgreSQL
@@ -51,6 +51,7 @@ import subprocess
51
51
  import typing
52
52
  import types
53
53
  import psutil
54
+ import testgres.postgres_configuration as testgres_pgconf
54
55
 
55
56
  from packaging.version import Version
56
57
 
@@ -95,7 +96,7 @@ class TestTestgresCommon:
95
96
  # Author: Mark G.
96
97
  assert v.major == 1
97
98
  assert v.minor == 14
98
- assert v.micro == 1
99
+ assert v.micro == 2
99
100
 
100
101
  assert str(v) == testgres_version
101
102
  return
@@ -2760,6 +2761,56 @@ where c.relname=%s;"""
2760
2761
  node_svc.os_ops.rmdirs(tmp_dir)
2761
2762
  return
2762
2763
 
2764
+ def test_node_app__make_empty_and_pgconf(self, node_svc: PostgresNodeService):
2765
+ assert type(node_svc) is PostgresNodeService
2766
+
2767
+ assert type(node_svc) is PostgresNodeService
2768
+
2769
+ assert isinstance(node_svc.os_ops, OsOperations)
2770
+ assert node_svc.port_manager is not None
2771
+ assert isinstance(node_svc.port_manager, PortManager)
2772
+
2773
+ tmp_dir = node_svc.os_ops.mkdtemp()
2774
+ assert tmp_dir is not None
2775
+ assert type(tmp_dir) is str
2776
+ logging.info("temp directory is [{}]".format(tmp_dir))
2777
+
2778
+ # -----------
2779
+ node_app = NodeApp(
2780
+ test_path=tmp_dir,
2781
+ os_ops=node_svc.os_ops,
2782
+ port_manager=node_svc.port_manager
2783
+ )
2784
+
2785
+ # TODO: We have to use node_svc.os_ops here
2786
+
2787
+ with node_app.make_simple("abc") as node:
2788
+ node_conf = testgres_pgconf.PostgresConfiguration(node.data_dir)
2789
+
2790
+ logging.info("Configuration is readed ...")
2791
+ testgres_pgconf.PostgresConfigurationReader.LoadConfiguration(node_conf)
2792
+
2793
+ logging.info("Configuration is checked ...")
2794
+ prop__port = node_conf.GetOptionValue("port")
2795
+ assert type(prop__port) is int
2796
+ assert prop__port == node.port
2797
+ # presets are checked
2798
+ prop__fsync = node_conf.GetOptionValue("fsync")
2799
+ assert prop__fsync == "off" or prop__fsync is False
2800
+ prop__log_statement = node_conf.GetOptionValue("log_statement")
2801
+ assert type(prop__log_statement) is str
2802
+ assert prop__log_statement == "none"
2803
+ prop__wal_level = node_conf.GetOptionValue("wal_level")
2804
+ assert type(prop__wal_level) is str
2805
+ assert prop__wal_level == "logical"
2806
+
2807
+ logging.info("Configuration is written ...")
2808
+ testgres_pgconf.PostgresConfigurationWriter.WriteConfiguration(node_conf)
2809
+
2810
+ logging.info("Node is started ...")
2811
+ node.slow_start()
2812
+ return
2813
+
2763
2814
  @staticmethod
2764
2815
  def helper__get_node(
2765
2816
  node_svc: PostgresNodeService,
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes