@@ -79,7 +79,7 @@ def make_simple(
79
79
set_replication : bool = False ,
80
80
ptrack_enable : bool = False ,
81
81
initdb_params : T_LIST_STR = [],
82
- pg_options : T_DICT_STR_STR = {} ,
82
+ pg_options : typing . Optional [ T_DICT_STR_STR ] = None ,
83
83
checksum : bool = True ,
84
84
bin_dir : typing .Optional [str ] = None
85
85
) -> PostgresNode :
@@ -88,7 +88,7 @@ def make_simple(
88
88
assert type (set_replication ) == bool # noqa: E721
89
89
assert type (ptrack_enable ) == bool # noqa: E721
90
90
assert type (initdb_params ) == list # noqa: E721
91
- assert type (pg_options ) == dict # noqa: E721
91
+ assert pg_options is None or type (pg_options ) == dict # noqa: E721
92
92
assert type (checksum ) == bool # noqa: E721
93
93
assert bin_dir is None or type (bin_dir ) == str # noqa: E721
94
94
@@ -143,8 +143,10 @@ def make_simple(
143
143
options ['wal_keep_segments' ] = '12'
144
144
145
145
# Apply given parameters
146
- for option_name , option_value in pg_options .items ():
147
- options [option_name ] = option_value
146
+ if pg_options is not None :
147
+ assert type (pg_options ) == dict
148
+ for option_name , option_value in pg_options .items ():
149
+ options [option_name ] = option_value
148
150
149
151
# Define delayed propertyes
150
152
if not ("unix_socket_directories" in options .keys ()):
0 commit comments