Commit b9db725
committed
fix: add PostgreSQL authentication config to extension tests
The index_advisor and http extension tests were missing PostgreSQL
authentication configuration that allows the supabase_admin user to
connect, causing test failures with 'Peer authentication failed'.
Also fixed OrioleDB extension testing where schemas were not recreated
after database reinitialization when switching to OrioleDB specialization.
Additionally addressed all PR review comments:
- Added missing test.create_schema() call in http.nix after OrioleDB switch
- Added missing test.create_schema() call in index_advisor.nix after OrioleDB switch
- Made PostgresExtensionTest instantiation consistent across all test files
- Added explicit support_upgrade, ext_schema, and lib_name parameters
- Added create_schema() call after test instantiation
- Fixed background worker library path to use lib_name instead of pname
Code quality improvements (nitpicks):
- Standardized system references to use pkgs.stdenv.hostPlatform.system throughout
- Added safety checks before rm -rf operations to prevent accidental deletion
- Improved consistency across all extension test files
- Fixed shared library path resolution for background worker tests
Changes made:
- Added authentication, identMap, and ensureUsers configuration
- Added default settings to postgresql17 specializations
- Added schema creation after OrioleDB switch to handle reinitialization in all files
- Fixed PostgreSQL peer authentication for test infrastructure
- Standardized extension test patterns across all test files
- Added safety guards for data directory deletion operations
- Consistent cross-compilation support with hostPlatform.system
- Updated library path resolution to use proper libName for .so files
This ensures extension tests can properly connect to PostgreSQL
instances, that schemas exist for extension installation during
upgrade path and pg_regress testing with OrioleDB, and that background
worker tests use the correct shared library names.1 parent a4a591f commit b9db725
3 files changed
+75
-12
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
58 | 58 | | |
59 | 59 | | |
| |||
148 | 148 | | |
149 | 149 | | |
150 | 150 | | |
151 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
152 | 154 | | |
153 | 155 | | |
154 | 156 | | |
| |||
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
186 | | - | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
187 | 191 | | |
188 | 192 | | |
189 | 193 | | |
190 | 194 | | |
| 195 | + | |
| 196 | + | |
| 197 | + | |
| 198 | + | |
191 | 199 | | |
192 | 200 | | |
193 | 201 | | |
| |||
276 | 284 | | |
277 | 285 | | |
278 | 286 | | |
| 287 | + | |
279 | 288 | | |
280 | 289 | | |
281 | 290 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
47 | | - | |
48 | | - | |
49 | | - | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
50 | 52 | | |
51 | 53 | | |
52 | 54 | | |
| |||
70 | 72 | | |
71 | 73 | | |
72 | 74 | | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
73 | 89 | | |
74 | 90 | | |
75 | 91 | | |
| |||
91 | 107 | | |
92 | 108 | | |
93 | 109 | | |
| 110 | + | |
94 | 111 | | |
95 | 112 | | |
96 | 113 | | |
| |||
172 | 189 | | |
173 | 190 | | |
174 | 191 | | |
175 | | - | |
| 192 | + | |
| 193 | + | |
| 194 | + | |
176 | 195 | | |
177 | 196 | | |
178 | 197 | | |
179 | 198 | | |
| 199 | + | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
180 | 203 | | |
181 | 204 | | |
182 | 205 | | |
| |||
205 | 228 | | |
206 | 229 | | |
207 | 230 | | |
| 231 | + | |
208 | 232 | | |
209 | 233 | | |
210 | 234 | | |
211 | 235 | | |
212 | 236 | | |
| 237 | + | |
| 238 | + | |
213 | 239 | | |
214 | 240 | | |
215 | 241 | | |
| |||
218 | 244 | | |
219 | 245 | | |
220 | 246 | | |
221 | | - | |
| 247 | + | |
| 248 | + | |
222 | 249 | | |
223 | 250 | | |
224 | 251 | | |
| |||
232 | 259 | | |
233 | 260 | | |
234 | 261 | | |
235 | | - | |
| 262 | + | |
236 | 263 | | |
237 | 264 | | |
238 | 265 | | |
| |||
263 | 290 | | |
264 | 291 | | |
265 | 292 | | |
| 293 | + | |
266 | 294 | | |
267 | 295 | | |
268 | 296 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
69 | 69 | | |
70 | 70 | | |
71 | 71 | | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
72 | 86 | | |
73 | 87 | | |
74 | 88 | | |
| |||
77 | 91 | | |
78 | 92 | | |
79 | 93 | | |
| 94 | + | |
80 | 95 | | |
81 | 96 | | |
82 | 97 | | |
| |||
150 | 165 | | |
151 | 166 | | |
152 | 167 | | |
153 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
154 | 171 | | |
155 | 172 | | |
156 | 173 | | |
157 | 174 | | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
158 | 179 | | |
159 | 180 | | |
160 | 181 | | |
| |||
179 | 200 | | |
180 | 201 | | |
181 | 202 | | |
| 203 | + | |
182 | 204 | | |
183 | 205 | | |
184 | 206 | | |
185 | 207 | | |
186 | 208 | | |
| 209 | + | |
| 210 | + | |
187 | 211 | | |
188 | 212 | | |
189 | 213 | | |
| |||
192 | 216 | | |
193 | 217 | | |
194 | 218 | | |
195 | | - | |
| 219 | + | |
| 220 | + | |
196 | 221 | | |
197 | 222 | | |
198 | 223 | | |
| |||
206 | 231 | | |
207 | 232 | | |
208 | 233 | | |
209 | | - | |
| 234 | + | |
210 | 235 | | |
211 | 236 | | |
212 | 237 | | |
| |||
237 | 262 | | |
238 | 263 | | |
239 | 264 | | |
| 265 | + | |
240 | 266 | | |
241 | 267 | | |
242 | 268 | | |
| |||
0 commit comments