File tree 2 files changed +18
-0
lines changed
2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -698,6 +698,17 @@ def reload(self, params=[]):
698
698
699
699
return self
700
700
701
+ def pg_ctl (self , params ):
702
+ """
703
+ Invoke pg_ctl with params.
704
+
705
+ Returns:
706
+ Stdout + stderr of pg_ctl.
707
+ """
708
+
709
+ _params = params + ["-D" , self .data_dir , "-w" ]
710
+ return _execute_utility ("pg_ctl" , _params , self .utils_logname )
711
+
701
712
def free_port (self ):
702
713
"""
703
714
Reclaim port owned by this node.
Original file line number Diff line number Diff line change @@ -382,6 +382,13 @@ def test_reload(self):
382
382
383
383
self .assertEqual (pid1 , pid2 )
384
384
385
+ def test_pg_ctl (self ):
386
+ with get_new_node ('node' ) as node :
387
+ node .init ().start ()
388
+
389
+ status = node .pg_ctl (['status' ])
390
+ self .assertTrue ("server is running" in status )
391
+
385
392
def test_ports_management (self ):
386
393
# check that no ports have been bound yet
387
394
self .assertEqual (len (bound_ports ), 0 )
You can’t perform that action at this time.
0 commit comments