forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita7885c9
committed
Provide test coverage in pg_dump for default behaviors with compression
By default, the contents generated by the custom and directory dumpformats are compressed. However, with the existing test facility, therestore program will succeed regardless of whether the dumped output wascompressed or not without checking if anything has been compressed.This commit implements a portable way to check the contents of thecustom and directory dump formats:- glob_patterns, that can be defined for each test as an array ofglob()-compilable strings, tracking the contents that should or shouldnot be compressed. While this is useful to make sure that the tabledata is compressed, this also checks that blobs.toc and toc.dat arenever compressed.- command_like, to execute a command on a dump and check its generatedoutput. This is used here in correlation with pg_restore -l to check ifthe dumps have been compressed or not, depending on if the buildsupports gzip, or not.This hole in the tests has come up when working on5e73a60, wherecompression has to be applied by default, if available, for both dumpformats.The idea of glob_patterns comes from me, and Georgios has come up withthe design for command_like.Author: Georgios Kokolatos, Michael PaquierDiscussion:https://postgr.es/m/DQn4czCWR1rcbGPLL7p3LfEr5-kGmlySm-H05VgroINdikvhtS5r9EdI6b8D8sjnbKdJ09k-cxs2AqijBeHAWk9Q8gvEAxPRHuLRhwONcGc=@pm.me1 parent1bd47d0 commita7885c9
1 file changed
+71
-6
lines changedLines changed: 71 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
36 | 36 |
| |
37 | 37 |
| |
38 | 38 |
| |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
39 | 46 |
| |
40 | 47 |
| |
41 | 48 |
| |
| |||
46 | 53 |
| |
47 | 54 |
| |
48 | 55 |
| |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 |
| |
50 | 61 |
| |
51 | 62 |
| |
| |||
79 | 90 |
| |
80 | 91 |
| |
81 | 92 |
| |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
82 | 100 |
| |
83 | 101 |
| |
84 | 102 |
| |
| |||
96 | 114 |
| |
97 | 115 |
| |
98 | 116 |
| |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
99 | 122 |
| |
100 | 123 |
| |
101 | 124 |
| |
| |||
198 | 221 |
| |
199 | 222 |
| |
200 | 223 |
| |
| 224 | + | |
| 225 | + | |
| 226 | + | |
201 | 227 |
| |
202 | 228 |
| |
203 |
| - | |
204 | 229 |
| |
205 |
| - | |
| 230 | + | |
206 | 231 |
| |
207 | 232 |
| |
208 | 233 |
| |
209 | 234 |
| |
210 | 235 |
| |
211 | 236 |
| |
212 | 237 |
| |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
213 | 246 |
| |
214 | 247 |
| |
215 | 248 |
| |
| 249 | + | |
| 250 | + | |
| 251 | + | |
216 | 252 |
| |
217 | 253 |
| |
218 | 254 |
| |
| |||
224 | 260 |
| |
225 | 261 |
| |
226 | 262 |
| |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
227 | 278 |
| |
228 | 279 |
| |
229 | 280 |
| |
| |||
3920 | 3971 |
| |
3921 | 3972 |
| |
3922 | 3973 |
| |
3923 |
| - | |
3924 |
| - | |
3925 |
| - | |
3926 |
| - | |
3927 | 3974 |
| |
3928 | 3975 |
| |
3929 | 3976 |
| |
| |||
4153 | 4200 |
| |
4154 | 4201 |
| |
4155 | 4202 |
| |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
4156 | 4221 |
| |
4157 | 4222 |
| |
4158 | 4223 |
| |
|
0 commit comments
Comments
(0)