This repository was archived by the owner on Dec 1, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathboil_suites_test.go
391 lines (362 loc) · 15.9 KB
/
boil_suites_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
// Code generated by SQLBoiler 3.5.0 (https://github.com/volatiletech/sqlboiler). DO NOT EDIT.
// This file is meant to be re-generated in place and/or deleted at any time.
package models
import "testing"
// This test suite runs each operation test in parallel.
// Example, if your database has 3 tables, the suite will run:
// table1, table2 and table3 Delete in parallel
// table1, table2 and table3 Insert in parallel, and so forth.
// It does NOT run each operation group in parallel.
// Separating the tests thusly grants avoidance of Postgres deadlocks.
func TestParent(t *testing.T) {
t.Run("Articles", testArticles)
t.Run("ArticleComments", testArticleComments)
t.Run("Contests", testContests)
t.Run("ContestPlayers", testContestPlayers)
t.Run("ContestRanklists", testContestRanklists)
t.Run("Files", testFiles)
t.Run("FormattedCodes", testFormattedCodes)
t.Run("JudgeStates", testJudgeStates)
t.Run("Problems", testProblems)
t.Run("ProblemTags", testProblemTags)
t.Run("ProblemTagMaps", testProblemTagMaps)
t.Run("RatingCalculations", testRatingCalculations)
t.Run("RatingHistories", testRatingHistories)
t.Run("SubmissionStatistics", testSubmissionStatistics)
t.Run("Users", testUsers)
t.Run("UserPrivileges", testUserPrivileges)
}
func TestDelete(t *testing.T) {
t.Run("Articles", testArticlesDelete)
t.Run("ArticleComments", testArticleCommentsDelete)
t.Run("Contests", testContestsDelete)
t.Run("ContestPlayers", testContestPlayersDelete)
t.Run("ContestRanklists", testContestRanklistsDelete)
t.Run("Files", testFilesDelete)
t.Run("FormattedCodes", testFormattedCodesDelete)
t.Run("JudgeStates", testJudgeStatesDelete)
t.Run("Problems", testProblemsDelete)
t.Run("ProblemTags", testProblemTagsDelete)
t.Run("ProblemTagMaps", testProblemTagMapsDelete)
t.Run("RatingCalculations", testRatingCalculationsDelete)
t.Run("RatingHistories", testRatingHistoriesDelete)
t.Run("SubmissionStatistics", testSubmissionStatisticsDelete)
t.Run("Users", testUsersDelete)
t.Run("UserPrivileges", testUserPrivilegesDelete)
}
func TestQueryDeleteAll(t *testing.T) {
t.Run("Articles", testArticlesQueryDeleteAll)
t.Run("ArticleComments", testArticleCommentsQueryDeleteAll)
t.Run("Contests", testContestsQueryDeleteAll)
t.Run("ContestPlayers", testContestPlayersQueryDeleteAll)
t.Run("ContestRanklists", testContestRanklistsQueryDeleteAll)
t.Run("Files", testFilesQueryDeleteAll)
t.Run("FormattedCodes", testFormattedCodesQueryDeleteAll)
t.Run("JudgeStates", testJudgeStatesQueryDeleteAll)
t.Run("Problems", testProblemsQueryDeleteAll)
t.Run("ProblemTags", testProblemTagsQueryDeleteAll)
t.Run("ProblemTagMaps", testProblemTagMapsQueryDeleteAll)
t.Run("RatingCalculations", testRatingCalculationsQueryDeleteAll)
t.Run("RatingHistories", testRatingHistoriesQueryDeleteAll)
t.Run("SubmissionStatistics", testSubmissionStatisticsQueryDeleteAll)
t.Run("Users", testUsersQueryDeleteAll)
t.Run("UserPrivileges", testUserPrivilegesQueryDeleteAll)
}
func TestSliceDeleteAll(t *testing.T) {
t.Run("Articles", testArticlesSliceDeleteAll)
t.Run("ArticleComments", testArticleCommentsSliceDeleteAll)
t.Run("Contests", testContestsSliceDeleteAll)
t.Run("ContestPlayers", testContestPlayersSliceDeleteAll)
t.Run("ContestRanklists", testContestRanklistsSliceDeleteAll)
t.Run("Files", testFilesSliceDeleteAll)
t.Run("FormattedCodes", testFormattedCodesSliceDeleteAll)
t.Run("JudgeStates", testJudgeStatesSliceDeleteAll)
t.Run("Problems", testProblemsSliceDeleteAll)
t.Run("ProblemTags", testProblemTagsSliceDeleteAll)
t.Run("ProblemTagMaps", testProblemTagMapsSliceDeleteAll)
t.Run("RatingCalculations", testRatingCalculationsSliceDeleteAll)
t.Run("RatingHistories", testRatingHistoriesSliceDeleteAll)
t.Run("SubmissionStatistics", testSubmissionStatisticsSliceDeleteAll)
t.Run("Users", testUsersSliceDeleteAll)
t.Run("UserPrivileges", testUserPrivilegesSliceDeleteAll)
}
func TestExists(t *testing.T) {
t.Run("Articles", testArticlesExists)
t.Run("ArticleComments", testArticleCommentsExists)
t.Run("Contests", testContestsExists)
t.Run("ContestPlayers", testContestPlayersExists)
t.Run("ContestRanklists", testContestRanklistsExists)
t.Run("Files", testFilesExists)
t.Run("FormattedCodes", testFormattedCodesExists)
t.Run("JudgeStates", testJudgeStatesExists)
t.Run("Problems", testProblemsExists)
t.Run("ProblemTags", testProblemTagsExists)
t.Run("ProblemTagMaps", testProblemTagMapsExists)
t.Run("RatingCalculations", testRatingCalculationsExists)
t.Run("RatingHistories", testRatingHistoriesExists)
t.Run("SubmissionStatistics", testSubmissionStatisticsExists)
t.Run("Users", testUsersExists)
t.Run("UserPrivileges", testUserPrivilegesExists)
}
func TestFind(t *testing.T) {
t.Run("Articles", testArticlesFind)
t.Run("ArticleComments", testArticleCommentsFind)
t.Run("Contests", testContestsFind)
t.Run("ContestPlayers", testContestPlayersFind)
t.Run("ContestRanklists", testContestRanklistsFind)
t.Run("Files", testFilesFind)
t.Run("FormattedCodes", testFormattedCodesFind)
t.Run("JudgeStates", testJudgeStatesFind)
t.Run("Problems", testProblemsFind)
t.Run("ProblemTags", testProblemTagsFind)
t.Run("ProblemTagMaps", testProblemTagMapsFind)
t.Run("RatingCalculations", testRatingCalculationsFind)
t.Run("RatingHistories", testRatingHistoriesFind)
t.Run("SubmissionStatistics", testSubmissionStatisticsFind)
t.Run("Users", testUsersFind)
t.Run("UserPrivileges", testUserPrivilegesFind)
}
func TestBind(t *testing.T) {
t.Run("Articles", testArticlesBind)
t.Run("ArticleComments", testArticleCommentsBind)
t.Run("Contests", testContestsBind)
t.Run("ContestPlayers", testContestPlayersBind)
t.Run("ContestRanklists", testContestRanklistsBind)
t.Run("Files", testFilesBind)
t.Run("FormattedCodes", testFormattedCodesBind)
t.Run("JudgeStates", testJudgeStatesBind)
t.Run("Problems", testProblemsBind)
t.Run("ProblemTags", testProblemTagsBind)
t.Run("ProblemTagMaps", testProblemTagMapsBind)
t.Run("RatingCalculations", testRatingCalculationsBind)
t.Run("RatingHistories", testRatingHistoriesBind)
t.Run("SubmissionStatistics", testSubmissionStatisticsBind)
t.Run("Users", testUsersBind)
t.Run("UserPrivileges", testUserPrivilegesBind)
}
func TestOne(t *testing.T) {
t.Run("Articles", testArticlesOne)
t.Run("ArticleComments", testArticleCommentsOne)
t.Run("Contests", testContestsOne)
t.Run("ContestPlayers", testContestPlayersOne)
t.Run("ContestRanklists", testContestRanklistsOne)
t.Run("Files", testFilesOne)
t.Run("FormattedCodes", testFormattedCodesOne)
t.Run("JudgeStates", testJudgeStatesOne)
t.Run("Problems", testProblemsOne)
t.Run("ProblemTags", testProblemTagsOne)
t.Run("ProblemTagMaps", testProblemTagMapsOne)
t.Run("RatingCalculations", testRatingCalculationsOne)
t.Run("RatingHistories", testRatingHistoriesOne)
t.Run("SubmissionStatistics", testSubmissionStatisticsOne)
t.Run("Users", testUsersOne)
t.Run("UserPrivileges", testUserPrivilegesOne)
}
func TestAll(t *testing.T) {
t.Run("Articles", testArticlesAll)
t.Run("ArticleComments", testArticleCommentsAll)
t.Run("Contests", testContestsAll)
t.Run("ContestPlayers", testContestPlayersAll)
t.Run("ContestRanklists", testContestRanklistsAll)
t.Run("Files", testFilesAll)
t.Run("FormattedCodes", testFormattedCodesAll)
t.Run("JudgeStates", testJudgeStatesAll)
t.Run("Problems", testProblemsAll)
t.Run("ProblemTags", testProblemTagsAll)
t.Run("ProblemTagMaps", testProblemTagMapsAll)
t.Run("RatingCalculations", testRatingCalculationsAll)
t.Run("RatingHistories", testRatingHistoriesAll)
t.Run("SubmissionStatistics", testSubmissionStatisticsAll)
t.Run("Users", testUsersAll)
t.Run("UserPrivileges", testUserPrivilegesAll)
}
func TestCount(t *testing.T) {
t.Run("Articles", testArticlesCount)
t.Run("ArticleComments", testArticleCommentsCount)
t.Run("Contests", testContestsCount)
t.Run("ContestPlayers", testContestPlayersCount)
t.Run("ContestRanklists", testContestRanklistsCount)
t.Run("Files", testFilesCount)
t.Run("FormattedCodes", testFormattedCodesCount)
t.Run("JudgeStates", testJudgeStatesCount)
t.Run("Problems", testProblemsCount)
t.Run("ProblemTags", testProblemTagsCount)
t.Run("ProblemTagMaps", testProblemTagMapsCount)
t.Run("RatingCalculations", testRatingCalculationsCount)
t.Run("RatingHistories", testRatingHistoriesCount)
t.Run("SubmissionStatistics", testSubmissionStatisticsCount)
t.Run("Users", testUsersCount)
t.Run("UserPrivileges", testUserPrivilegesCount)
}
func TestHooks(t *testing.T) {
t.Run("Articles", testArticlesHooks)
t.Run("ArticleComments", testArticleCommentsHooks)
t.Run("Contests", testContestsHooks)
t.Run("ContestPlayers", testContestPlayersHooks)
t.Run("ContestRanklists", testContestRanklistsHooks)
t.Run("Files", testFilesHooks)
t.Run("FormattedCodes", testFormattedCodesHooks)
t.Run("JudgeStates", testJudgeStatesHooks)
t.Run("Problems", testProblemsHooks)
t.Run("ProblemTags", testProblemTagsHooks)
t.Run("ProblemTagMaps", testProblemTagMapsHooks)
t.Run("RatingCalculations", testRatingCalculationsHooks)
t.Run("RatingHistories", testRatingHistoriesHooks)
t.Run("SubmissionStatistics", testSubmissionStatisticsHooks)
t.Run("Users", testUsersHooks)
t.Run("UserPrivileges", testUserPrivilegesHooks)
}
func TestInsert(t *testing.T) {
t.Run("Articles", testArticlesInsert)
t.Run("Articles", testArticlesInsertWhitelist)
t.Run("ArticleComments", testArticleCommentsInsert)
t.Run("ArticleComments", testArticleCommentsInsertWhitelist)
t.Run("Contests", testContestsInsert)
t.Run("Contests", testContestsInsertWhitelist)
t.Run("ContestPlayers", testContestPlayersInsert)
t.Run("ContestPlayers", testContestPlayersInsertWhitelist)
t.Run("ContestRanklists", testContestRanklistsInsert)
t.Run("ContestRanklists", testContestRanklistsInsertWhitelist)
t.Run("Files", testFilesInsert)
t.Run("Files", testFilesInsertWhitelist)
t.Run("FormattedCodes", testFormattedCodesInsert)
t.Run("FormattedCodes", testFormattedCodesInsertWhitelist)
t.Run("JudgeStates", testJudgeStatesInsert)
t.Run("JudgeStates", testJudgeStatesInsertWhitelist)
t.Run("Problems", testProblemsInsert)
t.Run("Problems", testProblemsInsertWhitelist)
t.Run("ProblemTags", testProblemTagsInsert)
t.Run("ProblemTags", testProblemTagsInsertWhitelist)
t.Run("ProblemTagMaps", testProblemTagMapsInsert)
t.Run("ProblemTagMaps", testProblemTagMapsInsertWhitelist)
t.Run("RatingCalculations", testRatingCalculationsInsert)
t.Run("RatingCalculations", testRatingCalculationsInsertWhitelist)
t.Run("RatingHistories", testRatingHistoriesInsert)
t.Run("RatingHistories", testRatingHistoriesInsertWhitelist)
t.Run("SubmissionStatistics", testSubmissionStatisticsInsert)
t.Run("SubmissionStatistics", testSubmissionStatisticsInsertWhitelist)
t.Run("Users", testUsersInsert)
t.Run("Users", testUsersInsertWhitelist)
t.Run("UserPrivileges", testUserPrivilegesInsert)
t.Run("UserPrivileges", testUserPrivilegesInsertWhitelist)
}
// TestToOne tests cannot be run in parallel
// or deadlocks can occur.
func TestToOne(t *testing.T) {}
// TestOneToOne tests cannot be run in parallel
// or deadlocks can occur.
func TestOneToOne(t *testing.T) {}
// TestToMany tests cannot be run in parallel
// or deadlocks can occur.
func TestToMany(t *testing.T) {}
// TestToOneSet tests cannot be run in parallel
// or deadlocks can occur.
func TestToOneSet(t *testing.T) {}
// TestToOneRemove tests cannot be run in parallel
// or deadlocks can occur.
func TestToOneRemove(t *testing.T) {}
// TestOneToOneSet tests cannot be run in parallel
// or deadlocks can occur.
func TestOneToOneSet(t *testing.T) {}
// TestOneToOneRemove tests cannot be run in parallel
// or deadlocks can occur.
func TestOneToOneRemove(t *testing.T) {}
// TestToManyAdd tests cannot be run in parallel
// or deadlocks can occur.
func TestToManyAdd(t *testing.T) {}
// TestToManySet tests cannot be run in parallel
// or deadlocks can occur.
func TestToManySet(t *testing.T) {}
// TestToManyRemove tests cannot be run in parallel
// or deadlocks can occur.
func TestToManyRemove(t *testing.T) {}
func TestReload(t *testing.T) {
t.Run("Articles", testArticlesReload)
t.Run("ArticleComments", testArticleCommentsReload)
t.Run("Contests", testContestsReload)
t.Run("ContestPlayers", testContestPlayersReload)
t.Run("ContestRanklists", testContestRanklistsReload)
t.Run("Files", testFilesReload)
t.Run("FormattedCodes", testFormattedCodesReload)
t.Run("JudgeStates", testJudgeStatesReload)
t.Run("Problems", testProblemsReload)
t.Run("ProblemTags", testProblemTagsReload)
t.Run("ProblemTagMaps", testProblemTagMapsReload)
t.Run("RatingCalculations", testRatingCalculationsReload)
t.Run("RatingHistories", testRatingHistoriesReload)
t.Run("SubmissionStatistics", testSubmissionStatisticsReload)
t.Run("Users", testUsersReload)
t.Run("UserPrivileges", testUserPrivilegesReload)
}
func TestReloadAll(t *testing.T) {
t.Run("Articles", testArticlesReloadAll)
t.Run("ArticleComments", testArticleCommentsReloadAll)
t.Run("Contests", testContestsReloadAll)
t.Run("ContestPlayers", testContestPlayersReloadAll)
t.Run("ContestRanklists", testContestRanklistsReloadAll)
t.Run("Files", testFilesReloadAll)
t.Run("FormattedCodes", testFormattedCodesReloadAll)
t.Run("JudgeStates", testJudgeStatesReloadAll)
t.Run("Problems", testProblemsReloadAll)
t.Run("ProblemTags", testProblemTagsReloadAll)
t.Run("ProblemTagMaps", testProblemTagMapsReloadAll)
t.Run("RatingCalculations", testRatingCalculationsReloadAll)
t.Run("RatingHistories", testRatingHistoriesReloadAll)
t.Run("SubmissionStatistics", testSubmissionStatisticsReloadAll)
t.Run("Users", testUsersReloadAll)
t.Run("UserPrivileges", testUserPrivilegesReloadAll)
}
func TestSelect(t *testing.T) {
t.Run("Articles", testArticlesSelect)
t.Run("ArticleComments", testArticleCommentsSelect)
t.Run("Contests", testContestsSelect)
t.Run("ContestPlayers", testContestPlayersSelect)
t.Run("ContestRanklists", testContestRanklistsSelect)
t.Run("Files", testFilesSelect)
t.Run("FormattedCodes", testFormattedCodesSelect)
t.Run("JudgeStates", testJudgeStatesSelect)
t.Run("Problems", testProblemsSelect)
t.Run("ProblemTags", testProblemTagsSelect)
t.Run("ProblemTagMaps", testProblemTagMapsSelect)
t.Run("RatingCalculations", testRatingCalculationsSelect)
t.Run("RatingHistories", testRatingHistoriesSelect)
t.Run("SubmissionStatistics", testSubmissionStatisticsSelect)
t.Run("Users", testUsersSelect)
t.Run("UserPrivileges", testUserPrivilegesSelect)
}
func TestUpdate(t *testing.T) {
t.Run("Articles", testArticlesUpdate)
t.Run("ArticleComments", testArticleCommentsUpdate)
t.Run("Contests", testContestsUpdate)
t.Run("ContestPlayers", testContestPlayersUpdate)
t.Run("ContestRanklists", testContestRanklistsUpdate)
t.Run("Files", testFilesUpdate)
t.Run("FormattedCodes", testFormattedCodesUpdate)
t.Run("JudgeStates", testJudgeStatesUpdate)
t.Run("Problems", testProblemsUpdate)
t.Run("ProblemTags", testProblemTagsUpdate)
t.Run("ProblemTagMaps", testProblemTagMapsUpdate)
t.Run("RatingCalculations", testRatingCalculationsUpdate)
t.Run("RatingHistories", testRatingHistoriesUpdate)
t.Run("SubmissionStatistics", testSubmissionStatisticsUpdate)
t.Run("Users", testUsersUpdate)
t.Run("UserPrivileges", testUserPrivilegesUpdate)
}
func TestSliceUpdateAll(t *testing.T) {
t.Run("Articles", testArticlesSliceUpdateAll)
t.Run("ArticleComments", testArticleCommentsSliceUpdateAll)
t.Run("Contests", testContestsSliceUpdateAll)
t.Run("ContestPlayers", testContestPlayersSliceUpdateAll)
t.Run("ContestRanklists", testContestRanklistsSliceUpdateAll)
t.Run("Files", testFilesSliceUpdateAll)
t.Run("FormattedCodes", testFormattedCodesSliceUpdateAll)
t.Run("JudgeStates", testJudgeStatesSliceUpdateAll)
t.Run("Problems", testProblemsSliceUpdateAll)
t.Run("ProblemTags", testProblemTagsSliceUpdateAll)
t.Run("ProblemTagMaps", testProblemTagMapsSliceUpdateAll)
t.Run("RatingCalculations", testRatingCalculationsSliceUpdateAll)
t.Run("RatingHistories", testRatingHistoriesSliceUpdateAll)
t.Run("SubmissionStatistics", testSubmissionStatisticsSliceUpdateAll)
t.Run("Users", testUsersSliceUpdateAll)
t.Run("UserPrivileges", testUserPrivilegesSliceUpdateAll)
}