Kim Alvefur
3ee6df83b0
storage tests: Add test for the archive:summary API
...
Passes with memory, internal, sqlite
Fails with postgres as in #1766
2022-07-22 18:32:45 +02:00
Kim Alvefur
f679f0b26e
core.storagemanager: Respect archive ids issued by storage drivers in tests
...
Storage drivers may issue their own IDs tho none of the included ones do
this atm, but the 3rd party module mod_storage_xmlarchive has its
special format.
2021-08-15 12:28:58 +02:00
Kim Alvefur
4ecda569bd
core.storagemanager: s/Multilpe/Multiple/ [codespell]
2021-03-05 15:04:45 +01:00
Kim Alvefur
0f0d32d335
mod_storage_sql: Implement map-like API for archives
...
Used by mod_http_file_share, muc moderation, etc.
Tests tweaked because they failed on stanza internals that happen
becasue of re-serialization. Namespaces differ since inheritance is
implicit when building but explicit after parsing.
2021-02-01 12:47:05 +01:00
Kim Alvefur
f307825a01
storage: Test reverse-ordered queries
2021-02-01 12:17:56 +01:00
Kim Alvefur
d5fb7e2510
storage tests: Add test for querying a set of IDs
2021-01-12 18:03:40 +01:00
Kim Alvefur
87044c466f
storage tests: Test querys with both before and after IDs
...
Needed for extended MAM, supported by SQL storage already.
2021-01-12 15:52:14 +01:00
Matthew Wild
f2dbf36642
storage tests: Add tests for archive queries before/after specific ids
...
Also increased the size of the test data for easier debugging with more
complex tests.
2020-06-12 16:59:06 +01:00
Kim Alvefur
d916ce38f6
mod_storage_internal: Fix keeping old timestamp in archive map API
...
This led to a missing 'when' field on changed items, which would cause a
traceack.
2020-05-15 20:55:22 +02:00
Kim Alvefur
82714e54a8
mod_storage_internal: Implement key-value API
2020-05-11 21:56:19 +02:00
Kim Alvefur
0cf5e52384
spec/storage: Reset build context of test stanza make comparisons easier
...
While building a stanza there's a .last_add field keeping track of where
in the XML tree tags are being added. This field does not survive a
roundtrip through preserialize / deserialize. :reset() removes this,
which simplifes comparisons after such a roundtrip.
2020-05-11 21:41:02 +02:00
Matthew Wild
cb6148d155
storagemanager, mod_storage_sql: Rename methods to :get_all() and :delete_all()
2020-03-11 16:32:41 +00:00
Matthew Wild
81f5c3e319
storagemanager: Add support for :find_key() and :delete_key() to map store shim
2020-03-11 16:29:57 +00:00
Matthew Wild
e35a4db498
storagemanager: Fix unused variable in tests [luacheck]
2020-03-11 16:07:36 +00:00
Matthew Wild
33b9b2b91e
mod_storage_sql: Add map_store:find_key() and map_store:delete_key() (+ tests)
2020-03-11 15:57:53 +00:00
Matthew Wild
1d5af5f0a3
storagemanager: Add tests for map stores
2020-03-11 14:36:56 +00:00
Kim Alvefur
e0bcb4d7d4
tests: Silence [luacheck] warnings
2019-12-23 21:33:10 +01:00
Kim Alvefur
2b289f34f9
various: Don't rely on _G.unpack existing
2018-12-08 17:09:55 +01:00
Kim Alvefur
687384a94a
storagemanager: Fix tests on Lua 5.3
...
_G.unpack moved to table.unpack
2018-10-21 21:03:54 +02:00
Kim Alvefur
93aa49462f
storagemanager tests: Also cover memory driver
2018-10-12 03:43:56 +02:00
Matthew Wild
1c5c6c92c1
storagemanager tests: Remove debug print()
2018-10-11 14:18:38 +01:00
Matthew Wild
d422c3a4c0
storagemanager tests: Add many more archive tests, including (failing) cases for #1200 and #1073
2018-10-11 14:10:55 +01:00
Matthew Wild
2a92bf5c27
storagemanager tests: Add additional archive query tests
2018-10-11 13:29:14 +01:00
Matthew Wild
6b841f66fd
storagemanager tests: Add some additional checks
2018-10-10 22:03:11 +01:00
Matthew Wild
038921d7e0
storagemanager tests: Add initial basic tests for archive stores
2018-10-10 22:00:37 +01:00
Matthew Wild
a9963c54c9
Fix storage tests so they run, but not by default
2018-10-01 20:21:26 +01:00