File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -111,6 +111,7 @@ async def before_server_start(_, loop):
111
111
echo = app .config .setdefault ('DB_ECHO' , False ),
112
112
min_size = app .config .setdefault ('DB_POOL_MIN_SIZE' , 5 ),
113
113
max_size = app .config .setdefault ('DB_POOL_MAX_SIZE' , 10 ),
114
+ ssl = app .config .setdefault ('DB_SSL' ),
114
115
loop = loop ,
115
116
)
116
117
Original file line number Diff line number Diff line change @@ -76,6 +76,19 @@ async def app():
76
76
})
77
77
78
78
79
+ @pytest .fixture
80
+ @async_generator
81
+ async def app_ssl (ssl_ctx ):
82
+ await _app ({
83
+ 'DB_HOST' : DB_ARGS ['host' ],
84
+ 'DB_PORT' : DB_ARGS ['port' ],
85
+ 'DB_USER' : DB_ARGS ['user' ],
86
+ 'DB_PASSWORD' : DB_ARGS ['password' ],
87
+ 'DB_DATABASE' : DB_ARGS ['database' ],
88
+ 'DB_SSL' : ssl_ctx ,
89
+ })
90
+
91
+
79
92
@pytest .fixture
80
93
@async_generator
81
94
async def app_dsn ():
@@ -116,5 +129,9 @@ def test(app):
116
129
_test (app )
117
130
118
131
132
+ def test_ssl (app_ssl ):
133
+ _test (app_ssl )
134
+
135
+
119
136
def test_dsn (app_dsn ):
120
137
_test (app_dsn )
You can’t perform that action at this time.
0 commit comments