File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,16 @@ def utils_log_file(self):
278278 def pg_log_file (self ):
279279 return os .path .join (self .logs_dir , PG_LOG_FILE )
280280
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+
281291 def _try_shutdown (self , max_attempts ):
282292 attempts = 0
283293
Original file line number Diff line number Diff line change @@ -857,6 +857,12 @@ def test_version_management(self):
857857 self .assertTrue (b > c )
858858 self .assertTrue (a > c )
859859
860+ version = get_pg_version ()
861+ with get_new_node () as node :
862+ self .assertTrue (isinstance (version , str ))
863+ self .assertTrue (isinstance (node .version , PgVer ))
864+ self .assertTrue (node .version == version )
865+
860866 def test_child_pids (self ):
861867 master_processes = [
862868 ProcessType .AutovacuumLauncher ,
You can’t perform that action at this time.
0 commit comments