File tree 2 files changed +17
-0
lines changed
2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,16 @@ def utils_log_file(self):
278
278
def pg_log_file (self ):
279
279
return os .path .join (self .logs_dir , PG_LOG_FILE )
280
280
281
+ @property
282
+ def version (self ):
283
+ """
284
+ Return PostgreSQL version for this node.
285
+
286
+ Returns:
287
+ Instance of :class:`distutils.version.LooseVersion`.
288
+ """
289
+ return self ._pg_version
290
+
281
291
def _try_shutdown (self , max_attempts ):
282
292
attempts = 0
283
293
Original file line number Diff line number Diff line change 7
7
import tempfile
8
8
import testgres
9
9
import time
10
+ import six
10
11
import unittest
11
12
12
13
import logging .config
@@ -857,6 +858,12 @@ def test_version_management(self):
857
858
self .assertTrue (b > c )
858
859
self .assertTrue (a > c )
859
860
861
+ version = get_pg_version ()
862
+ with get_new_node () as node :
863
+ self .assertTrue (isinstance (version , six .string_types ))
864
+ self .assertTrue (isinstance (node .version , PgVer ))
865
+ self .assertEqual (node .version , str (version ))
866
+
860
867
def test_child_pids (self ):
861
868
master_processes = [
862
869
ProcessType .AutovacuumLauncher ,
You can’t perform that action at this time.
0 commit comments