Skip to content

Commit 0a8271f

Browse files
committed
Fix tests
1 parent 83c606c commit 0a8271f

File tree

6 files changed

+12
-12
lines changed

6 files changed

+12
-12
lines changed

packages/settings-library/src/settings_library/postgres.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ def _update_json_schema_extra(schema: JsonDict) -> None:
124124
"POSTGRES_USER": "usr",
125125
"POSTGRES_PASSWORD": "secret",
126126
"POSTGRES_DB": "db",
127-
"POSTGRES_MINSIZE": 1,
127+
"POSTGRES_MINSIZE": 2,
128128
"POSTGRES_MAXSIZE": 50,
129129
"POSTGRES_CLIENT_NAME": "my_app", # first-choice
130130
"HOST": "should be ignored",

packages/settings-library/tests/data/.env-granular

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ POSTGRES_PASSWORD=**********
1313
# Database name
1414
POSTGRES_DB=foodb
1515
# Minimum number of connections in the pool
16-
POSTGRES_MINSIZE=1
16+
POSTGRES_MINSIZE=2
1717
# Maximum number of connections in the pool
1818
POSTGRES_MAXSIZE=50
1919
# Name of the application connecting the postgres database, will default to use the host hostname (hostname on linux)

packages/settings-library/tests/data/.env-mixed

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ POSTGRES_PASSWORD=**********
1313
# Database name
1414
POSTGRES_DB=foodb
1515
# Minimum number of connections in the pool
16-
POSTGRES_MINSIZE=1
16+
POSTGRES_MINSIZE=2
1717
# Maximum number of connections in the pool
1818
POSTGRES_MAXSIZE=50
1919
# Name of the application connecting the postgres database, will default to use the host hostname (hostname on linux)

packages/settings-library/tests/data/.env-sample

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ POSTGRES_PASSWORD=secret
99
# Database name
1010
POSTGRES_DB=foodb
1111
# Maximum number of connections in the pool
12-
POSTGRES_MINSIZE=1
12+
POSTGRES_MINSIZE=2
1313
# Minimum number of connections in the pool
1414
POSTGRES_MAXSIZE=50
1515

packages/settings-library/tests/test_base_w_postgres.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ class _FakePostgresSettings(BaseCustomSettings):
5555
POSTGRES_PASSWORD: str
5656

5757
POSTGRES_DB: str
58-
POSTGRES_MINSIZE: Annotated[int, Field(ge=1)] = 1
58+
POSTGRES_MINSIZE: Annotated[int, Field(ge=2)] = 2
5959
POSTGRES_MAXSIZE: Annotated[int, Field(ge=1)] = 50
6060

6161
POSTGRES_CLIENT_NAME: Annotated[
@@ -200,7 +200,7 @@ def test_parse_from_individual_envs(
200200
"POSTGRES_PASSWORD": "shh",
201201
"POSTGRES_DB": "db",
202202
"POSTGRES_MAXSIZE": 50,
203-
"POSTGRES_MINSIZE": 1,
203+
"POSTGRES_MINSIZE": 2,
204204
"POSTGRES_CLIENT_NAME": None,
205205
}
206206
}
@@ -215,7 +215,7 @@ def test_parse_from_individual_envs(
215215
"POSTGRES_PASSWORD": "shh",
216216
"POSTGRES_DB": "db",
217217
"POSTGRES_MAXSIZE": 50,
218-
"POSTGRES_MINSIZE": 1,
218+
"POSTGRES_MINSIZE": 2,
219219
"POSTGRES_CLIENT_NAME": None,
220220
}
221221
}
@@ -262,7 +262,7 @@ def test_parse_compact_env(
262262
"POSTGRES_PASSWORD": "shh2",
263263
"POSTGRES_DB": "db2",
264264
"POSTGRES_MAXSIZE": 50,
265-
"POSTGRES_MINSIZE": 1,
265+
"POSTGRES_MINSIZE": 2,
266266
"POSTGRES_CLIENT_NAME": None,
267267
}
268268
}
@@ -372,7 +372,7 @@ def test_parse_from_mixed_envs(
372372
"POSTGRES_PASSWORD": "shh2",
373373
"POSTGRES_DB": "db2",
374374
"POSTGRES_MAXSIZE": 50,
375-
"POSTGRES_MINSIZE": 1,
375+
"POSTGRES_MINSIZE": 2,
376376
"POSTGRES_CLIENT_NAME": None,
377377
}
378378
}

packages/settings-library/tests/test_utils_cli.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ def fake_granular_env_file_content() -> str:
7474
POSTGRES_USER=foo
7575
POSTGRES_PASSWORD=secret
7676
POSTGRES_DB=foodb
77-
POSTGRES_MINSIZE=1
77+
POSTGRES_MINSIZE=2
7878
POSTGRES_MAXSIZE=50
7979
POSTGRES_CLIENT_NAME=None
8080
MODULE_VALUE=10
@@ -188,7 +188,7 @@ def test_cli_default_settings_envs(
188188
"POSTGRES_USER": "foo",
189189
"POSTGRES_PASSWORD": "secret",
190190
"POSTGRES_DB": "foodb",
191-
"POSTGRES_MINSIZE": 1,
191+
"POSTGRES_MINSIZE": 2,
192192
"POSTGRES_MAXSIZE": 50,
193193
"POSTGRES_CLIENT_NAME": None,
194194
},
@@ -219,7 +219,7 @@ def test_cli_compact_settings_envs(
219219
"POSTGRES_USER": "foo",
220220
"POSTGRES_PASSWORD": "secret",
221221
"POSTGRES_DB": "foodb",
222-
"POSTGRES_MINSIZE": 1,
222+
"POSTGRES_MINSIZE": 2,
223223
"POSTGRES_MAXSIZE": 50,
224224
"POSTGRES_CLIENT_NAME": None,
225225
},

0 commit comments

Comments
 (0)