summaryrefslogtreecommitdiffstats
path: root/store/storetest/post_store.go
Commit message (Collapse)AuthorAgeFilesLines
* MM-11781: Basic Data Export Command Line. (#9296)George Goldberg2018-09-171-0/+96
| | | | | | | | | | | | | | | | * MM-11781: Basic Data Export Command Line. * ChannelStore new unit tests. * TeamStore new unit tests. * Unit test for new UserStore function. * Unit tests for post store new methods. * Review fixes. * Fix duplicate command name.
* Merge release-5.3Carlos Tadeu Panato Junior2018-09-101-2/+2
|\
| * Speed up search results post selection. (#9380)Christopher Speller2018-09-101-2/+2
| |
* | add megacheck as makefile target (#9288)Daniel Schalla2018-09-031-14/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | Fix code issues in channel_test.go Fix Channel Test Issues detected by Megacheck Fix API Emoji Test Issues detected by Megacheck Fixed API Issues Reported by Megacheck Fixed App issues reported by megacheck Remaining fixes removed test added by mistake from old HEAD gofmt Store Fixes simplified returns Fix test for multi member channel delete revert to delete unused function
* MM-11521/MM-11522 Fix being able to create users with invalid emails through ↵Harrison Healey2018-08-011-2/+2
| | | | | | | | | | | | | | API (#9199) * MM-11522 Fix being able to create users with invalid emails through API * Ensure store tests are using valid emails * Add missing license header * Remove invalid test case * Fix TestUpdateOAuthUserAttrs
* Pr 9039 (#9187)Martin Kraft2018-07-301-61/+136
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-11065: Allow to search and get archived channels from the API * Fixing more tests * Add some unit tests * Add includeDeleted parameter to session permissions check function * More test fixing * Adding archive channels list in channels search * Add restriction for archived channel edition * Reverting permissions checks modification * Changed the query parameter to include_deleted * Enable search archive channels as true by default * Adding tests for verify search on deleted channels * Allowing to override archive channels during the imports * Fixed test * Search in archive channels from the API must be explicitly requested * Removing includeDeleted parameter from GetChannelByName and GetChannelByNameForTeam * Back to ViewArchivedChannels config * Fixing tests * Reverting GetChannelByName parameter * Add include deleted parameter on GetChannel functions in plugins api * Fixing tests
* MM-10412: Adds deleteBy prop to posts. (#8896)Martin Kraft2018-06-011-6/+14
|
* Revert "MM-9770: rewrite getParentsPosts to improve performance (#8467)" ↵Derrick Anderson2018-04-301-153/+95
| | | | | (#8659) (#8694) This reverts commit 4b675b347b5241def7807fab5e01ce9b98531815.
* Relax 4k post message limit (#8478)Jesse Hallam2018-03-261-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * MM-9661: rename POST_MESSAGE_MAX_RUNES to \0_v1 * MM-9661: s/4000/POST_MESSAGE_MAX_RUNES_V1/ in tests * MM-9661: introduce POST_MESSAGE_MAX_RUNES_V2 * MM-9661: migrate Postgres Posts.Message column to TEXT from VARCHAR(4000) This is safe to do in a production instance since the underyling type is not changing. We explicitly don't do this automatically for MySQL, but also don't need to since the ORM would have already created a TEXT column for MySQL in that case. * MM-9661: emit MaxPostSize in client config This value remains unconfigurable at this time, but exposes the current limit to the client. The limit remains at 4k in this commit. * MM-9661: introduce and use SqlPostStore.GetMaxPostSize Enforce a byte limitation in the database, and use 1/4 of that value as the rune count limitation (assuming a worst case UTF-8 representation). * move maxPostSizeCached, lastPostsCache and lastPostTimeCache out of the global context and onto the SqlPostStore * address feedback from code review: * ensure sqlstore unit tests are actually being run * move global caches into SqlPostStore * leverage sync.Once to address a race condition * modify upgrade semantics to match new db semantics gorp's behaviour on creating columns with a maximum length on Postgres differs from MySQL: * Postgres * gorp uses TEXT for string columns without a maximum length * gorp uses VARCHAR(N) for string columns with a maximum length of N * MySQL * gorp uses TEXT for string columns with a maximum length >= 256 * gorp uses VARCHAR(N) for string columns with a maximum length of N * gorp defaults to a maximum length of 255, implying VARCHAR(255) So the Message column has been TEXT on MySQL but VARCHAR(4000) on Postgres. With the new, longer limits of 65535, and without changes to gorp, the expected behaviour is TEXT on MySQL and VARCHAR(65535) on Postgres. This commit makes the upgrade semantics match the new database semantics. Ideally, we'd revisit the gorp behaviour at a later time. * allow TestMaxPostSize test cases to actually run in parallel * default maxPostSizeCached to POST_MESSAGE_MAX_RUNES_V1 in case the once initializer panics * fix casting error * MM-9661: skip the schema migration for Postgres It turns out resizing VARCHAR requires a rewrite in some versions of Postgres, but migrating VARCHAR to TEXT does not. Given the increasing complexity, let's defer the migration to the enduser instead.
* MM-9770: rewrite getParentsPosts to improve performance (#8467)Jesse Hallam2018-03-161-95/+153
| | | | | | | | | | | | | | | | | | | | * rename variables in testPostStoreGetPostsWithDetails This helps to clarify the structure of the posts under test. * clarify and expand existing testPostStoreGetPostsWithDetails assertions * expand testPostStoreGetPostsWithDetails assertions This verifies that replies to posts in the window, themselves not in the window (because of a non-zero offset) are still fetched. They were previously missing. * MM-9770: rewrite getParentsPosts to improve performance See discussion on ~developers-performance, but the basic idea here is to force the database to use the `PRIMARY` index when fetching posts instead of trying to filter down by channel and doing a scan.
* ABC-228 Update GetPosts caching to work for non-60 limits (#8233)Joram Wilander2018-02-091-2/+21
| | | | | | | | * Update GetPosts caching to work for non-60 limits * Only cache on limits of 30/60 and add test * Add comments clarifying 30 and 60 limits
* fix posts created at test (#7977)Chris2017-12-141-10/+5
|
* Remove unused variables / code (#7736)Chris2017-10-301-1/+1
| | | | | | * remove unused variables / code * fix bug in testPostStoreGetOldest
* PLT-7934: Make query for bulk elasticsearch indexing more efficient. (#7664)George Goldberg2017-10-251-1/+30
|
* refactor max channels per team enforcement (#7690)Chris2017-10-201-7/+7
|
* store/storetest package (#7588)Chris2017-10-061-0/+1684
* prerequisites * storetest package