Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2693dac

Browse files
committed
Use kwargs for PostgresNode.init
1 parent 8e5b09d commit 2693dac

File tree

1 file changed

+3
-9
lines changed

1 file changed

+3
-9
lines changed

testgres/node.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -254,19 +254,15 @@ def _collect_special_files(self):
254254

255255
return result
256256

257-
def init(self,
258-
fsync=False,
259-
unix_sockets=True,
260-
allow_streaming=True,
261-
initdb_params=None):
257+
def init(self, initdb_params=None, **kwargs):
262258
"""
263259
Perform initdb for this node.
264260
265261
Args:
262+
initdb_params: parameters for initdb (list).
266263
fsync: should this node use fsync to keep data safe?
267264
unix_sockets: should we enable UNIX sockets?
268265
allow_streaming: should this node add a hba entry for replication?
269-
initdb_params: parameters for initdb (list).
270266
271267
Returns:
272268
This instance of PostgresNode.
@@ -281,9 +277,7 @@ def init(self,
281277
params=initdb_params)
282278

283279
# initialize default config files
284-
self.default_conf(fsync=fsync,
285-
unix_sockets=unix_sockets,
286-
allow_streaming=allow_streaming)
280+
self.default_conf(**kwargs)
287281

288282
return self
289283

0 commit comments

Comments
 (0)