1
0
Fork 0
mirror of https://github.com/Eggbertx/gochan.git synced 2025-08-05 12:56:22 -07:00
Commit graph

240 commits

Author SHA1 Message Date
Eggbertx
1032042472 Fix changes suggested by sqlclosecheck 2024-05-24 16:10:07 -07:00
Eggbertx
27a0142864 Replace nil with background context in tests 2024-05-24 14:20:41 -07:00
Eggbertx
692602402c replace hacky interfaceSlice function in gcsql with []any{...} 2024-05-24 14:19:50 -07:00
Eggbertx
48fc697f8e Use timeout+context in getting all boards and goroutine in building multiple boards 2024-05-24 14:02:13 -07:00
Eggbertx
b334cda25d use timeout saved in gcdb struct instead of checking config 2024-05-24 13:59:14 -07:00
Eggbertx
8b9d7bf7aa Add database optimization for Postgres and SQLite 2024-05-23 21:27:14 -07:00
Eggbertx
caea5ee77e Add tests for QueryRowContextSQL 2024-05-04 18:22:30 -07:00
Eggbertx
0055756555 Test preparation timeout 2024-05-04 17:18:47 -07:00
Eggbertx
124683f037 Add context usage for querying and executing SQL 2024-05-04 16:50:44 -07:00
Eggbertx
b26146f301 refactor usage of SystemCriticalConfig to SQLConfig where appropriate 2024-05-04 15:31:08 -07:00
Eggbertx
a725dd6b86 Add BeginContextTx 2024-05-04 14:45:06 -07:00
Eggbertx
e4c088babf Apply configured default SQL timeout 2024-05-01 17:36:13 -07:00
Eggbertx
bece29d440 Refactor connection function signatures to use config.SQLConfig, start adding context usage to gcsql 2024-05-01 17:32:19 -07:00
Eggbertx
e446f2a5d7 Add tests for banpage.html template 2024-04-02 11:33:13 -07:00
Eggbertx
e1650ab3e3 Add public function for creating sqlmock-based tests in other packages 2024-04-01 11:27:41 -07:00
Eggbertx
dc454d1bc1 Move some test utility functions to testutil 2024-03-30 22:07:38 -07:00
Eggbertx
45ba890280 Refactor gcsql tests to clean them up a bit 2024-03-30 17:25:19 -07:00
Eggbertx
521296ed29 Add test for ApproveAppeal 2024-03-30 16:25:37 -07:00
Eggbertx
bcfa5f4269 Add GetAppeals tests 2024-03-30 13:29:02 -07:00
Eggbertx
cf19943008 remove testdata dir from gcsql as it's no longer needed (using sqlmock now) 2024-03-30 12:09:17 -07:00
Eggbertx
ab1606b035 Add provisioning tests for Postgres and SQLite3 2024-03-30 12:02:15 -07:00
Eggbertx
beca22cbf6 start breaking up long mock query lines 2024-03-29 16:52:56 -07:00
Eggbertx
1ef35975dc Add basic test for buildNewDatabase("mysql") 2024-03-29 16:44:41 -07:00
Eggbertx
84aa7978be Handle error returned by setupDBConn 2024-03-29 09:51:23 -07:00
Eggbertx
1417695dcc Add sqlmock tests 2024-03-28 23:04:22 -07:00
Eggbertx
8464c2447c Fix template issues with pointer/non-pointer receivers 2024-03-27 11:13:31 -07:00
Eggbertx
34e6887490 Start adding template function tests 2024-03-26 22:51:58 -07:00
Eggbertx
4917fdf3da Separate template functions 2024-03-26 17:49:22 -07:00
Eggbertx
09dfa2c3da Move init functions that only use public functions to dedicated subdirectories 2024-03-26 17:10:33 -07:00
Eggbertx
90b98c76de Create event for reloading board and section arrays 2024-03-13 14:58:22 -07:00
Eggbertx
4b5ea350eb Start moving template functions to their respective packages 2024-03-13 13:41:15 -07:00
Eggbertx
8404e3834e Add image and video thumbnail fingerprint checking on post attempt 2024-02-27 20:47:12 -08:00
Eggbertx
7580c965dc Properly handle ban_ip for file bans 2024-02-19 17:36:00 -08:00
Eggbertx
f250a5a356 Add flag and country to base post query 2024-02-19 17:05:56 -08:00
Eggbertx
4d187a27c8 Add fingerprinting stuff to file bans form 2024-02-18 16:42:27 -08:00
Eggbertx
5e7a648e37 Start adding ahash fingerprinting support 2024-02-12 15:22:58 -08:00
Eggbertx
2007b90556 Add basic geoip detection to posts, add image to post flag template 2024-01-20 22:41:40 -08:00
Eggbertx
24ff232c59 Add flag and country to post queries 2024-01-17 15:55:41 -08:00
Eggbertx
1deec0e462 Add country and flag columns to DB version 3 schema 2024-01-12 15:51:05 -08:00
Eggbertx
9352f0b611 Fix prefix not being applied in DB update 2024-01-09 21:45:39 -08:00
Eggbertx
0e34698257 Add more Postgres db migration for IP -> INET, split dbtypes into their own files 2024-01-09 13:11:22 -08:00
Eggbertx
d294462968 Fix SQL string replacer messing with prepared statements in Postgres 2024-01-02 17:02:42 -08:00
Eggbertx
121959fa15 Convert DBPREFIXposts.ip and DBPREFIXreports.ip to VARBINARY 2024-01-01 13:30:32 -08:00
Eggbertx
204ae9506f Update ban page and ban submission to accomodate ranges 2023-12-31 18:02:42 -08:00
Eggbertx
57693ba549 Replace IP field of IPBan with RangeStart and RangeEnd 2023-12-28 23:06:44 -08:00
Eggbertx
28963eb813 Add IP Range parsing, start working on adding range bans 2023-12-28 00:36:24 -08:00
Eggbertx
8e9543970a Remove "Verbosity" config field and rename "DebugMode" to "Verbose" for enabling command line output on errors 2023-12-27 17:07:33 -08:00
Eggbertx
7e07e24f16 Add template loading to the templates manage action 2023-12-21 15:55:29 -08:00
Eggbertx
a8436c5ee4 Fix some issues reported by DeepSource 2023-12-19 14:33:40 -08:00
Eggbertx
9688082339 Move Lua plugin loaders to their respective gochan packages 2023-10-24 16:27:27 -07:00