Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | util.bit53: Add bnot() method | Matthew Wild | 2024-03-01 | 1 | -0/+4 |
| | |||||
* | util.strbitop: Remove unused import in tests | Matthew Wild | 2024-02-23 | 1 | -1/+1 |
| | |||||
* | util.strbitop: Add common_prefix_bits() method | Matthew Wild | 2024-02-23 | 1 | -0/+44 |
| | | | | | This returns the number of bits that two strings have in common. It is significantly more efficient than similar calculations in Lua. | ||||
* | util.ip: Add another test case for match() and commonPrefixLength() | Matthew Wild | 2024-02-23 | 1 | -0/+4 |
| | |||||
* | util.strbitop: Rename spec file to correct name so tests actually run | Matthew Wild | 2024-02-23 | 1 | -0/+0 |
| | |||||
* | util.rfc6724: Remove, unused since introduction of Happy Eyeballs | Kim Alvefur | 2024-02-22 | 1 | -97/+0 |
| | | | | | | | | It was mainly used to determine whether to try IPv6 or IPv4 first, following the rules for this in the RFC. Now we always try IPv6 and IPv4 at roughly the same time, thus there no need to carry these rules. | ||||
* | MUC: Record reason for affiliation changes and return in list (fixes #1227) | Kim Alvefur | 2021-08-08 | 1 | -0/+72 |
| | |||||
* | MUC: Test that <subject/> + <thread/> is not handled as subject change | Kim Alvefur | 2024-01-23 | 1 | -0/+29 |
| | | | | | Ref #667 Ref #1838 | ||||
* | Merge 0.12->trunk | Kim Alvefur | 2023-12-17 | 1 | -0/+26 |
|\ | |||||
| * | mod_disco: Advertise disco#info and #items on bare JIDs to fix #1664 | Kim Alvefur | 2023-12-17 | 1 | -0/+26 |
| | | | | | | | | | | | | | | | | Having to add these in *there* places seems less than ideal. I would also think that advertising disco#info is a bit redundant, since it is a requirement for everything in XMPP and if it was missing you would get an error back. | ||||
* | | scansion: Use new style for accessing Lua globals | Kim Alvefur | 2023-12-17 | 1 | -1/+1 |
| | | |||||
* | | scansion: Use new prosody namespace in import | Kim Alvefur | 2023-12-17 | 1 | -1/+1 |
| | | |||||
* | | scansion: Use captures or wildcards instead of mocking time | Kim Alvefur | 2023-12-17 | 5 | -24/+14 |
| | | | | | | | | | | > Mockery is one of the things I hold dear! And he's making a mockery of it!! -- Belkar Bitterleaf | ||||
* | | util.xtemplate: Test the each template function | Kim Alvefur | 2023-12-16 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | It iterates over childtags, so a template like {foo|each{...}} would be equivalent to root:childtags("foo"), while a deeper query needs the bit that becomes arguments to :childtags as an argument to each, e.g. {foo/bar|each(baz)} would behave like root:get_child("foo"):get_child("bar"):childtags("baz") | ||||
* | | mod_storage_internal, tests: Fix before/after combined with the 'reverse' flag | Matthew Wild | 2023-12-12 | 1 | -0/+24 |
| | | |||||
* | | util.http: Silence strict luacheck warning in tests | Kim Alvefur | 2023-12-09 | 1 | -0/+1 |
| | | |||||
* | | core.moduleapi: Silence strict luacheck warnings in tests | Kim Alvefur | 2023-12-09 | 1 | -3/+3 |
| | | |||||
* | | util.throttle: Silence some strict luacheck warnings | Kim Alvefur | 2023-12-09 | 1 | -0/+1 |
| | | |||||
* | | util.xtemplate: Add some initial tests | Kim Alvefur | 2023-12-09 | 1 | -0/+35 |
| | | | | | | | | Strict typing does not magically make code correct | ||||
* | | util.jsonschema: Return basic structured validation response | Kim Alvefur | 2023-12-02 | 1 | -0/+1 |
| | | |||||
* | | Merge 0.12->trunk | Kim Alvefur | 2023-12-01 | 1 | -0/+27 |
|\| | |||||
| * | net.http.parser: Reject overlarge header section earlier | Kim Alvefur | 2023-08-23 | 1 | -0/+27 |
| | | | | | | | | This case would eventually be rejected by the buffer size limit. | ||||
| * | util.array: Fix new() library function | Kim Alvefur | 2023-07-22 | 1 | -0/+7 |
| | | | | | | | | Backport of ffe4adbd2af9 since new was added in the 0.12 branch | ||||
* | | util.human.io: Don't accept ambiguous durations by default | Matthew Wild | 2023-11-30 | 1 | -1/+32 |
| | | | | | | | | | | The new method parse_duration_lax() exports the old behaviour, mainly for compatibility purposes. | ||||
* | | util.uuid: Add UUIDv7 | Kim Alvefur | 2021-08-15 | 1 | -0/+22 |
| | | | | | | | | | | | | | | | | | | Allows sorting by id as a substitute for sorting by timestamp since it has the timestamp in the encoded in the first part, and only things that happen extremely close together may get out of order by such a sort, which might not matter. From draft-ietf-uuidrev-rfc4122bis formerly draft-peabody-dispatch-new-uuid-format | ||||
* | | util.array: Fix new() library function | Kim Alvefur | 2023-07-22 | 1 | -0/+7 |
| | | |||||
* | | tests: Add hack to test only a single storage driver | Kim Alvefur | 2023-07-22 | 1 | -0/+5 |
| | | | | | | | | | | Fixes that LuaDBI being unavailable makes these produce nothing but endless stack overflows in luarocks. | ||||
* | | tests: Update storagemanager tests for prosody.* namespace change | Kim Alvefur | 2023-07-22 | 1 | -8/+6 |
| | | | | | | | | | | Part of an attempt to make these tests work again. Previously they would just explode in a million luarocks stack overflows | ||||
* | | util.human.io: Add tests for parse_duration() (some failing) | Kim Alvefur | 2023-07-16 | 1 | -0/+9 |
| | | |||||
* | | util.human.io: Include relevant arguments in test messages | Kim Alvefur | 2023-07-16 | 1 | -1/+1 |
| | | | | | | | | This way the relevant arguments are shown in case a test case fails | ||||
* | | util.human.io: Use tail call in test to get correct line numbers | Kim Alvefur | 2023-07-16 | 1 | -1/+1 |
| | | | | | | | | | | | | This is probably not guaranteed to work and might vary with Lua version, but it's good enough for me to get accurate line numbers out of Busted that don't all point to the test() function. | ||||
* | | util.cache: Pass cache itself to eviction callback | Kim Alvefur | 2023-06-30 | 1 | -2/+1 |
| | | | | | | | | | | | | | | Simplifies access to the cache without moving code around a lot given the currently common pattern of local some_cache = cache.new(size, function(k,v) end) | ||||
* | | util.cache: Keep eviction candidate if callback resized to make room | Kim Alvefur | 2023-06-30 | 1 | -0/+21 |
| | | | | | | | | | | Previously either the old or the new values would be rejected, even if the cache was resized to allow more items. | ||||
* | | util.argparse: Add support for repeatable parameters | Kim Alvefur | 2022-01-05 | 1 | -0/+5 |
| | | | | | | | | These are gathered into arrays | ||||
* | | storagemanager tests: Reorder test data in chronological order | Kim Alvefur | 2021-05-11 | 1 | -13/+13 |
| | | | | | | | | | | | | | | Why was the test data not in chronological order? Altho, maybe that was the point? Except for MAM, the data might *not* be in chronological order! | ||||
* | | util.http: Implement parser for RFC 7239 Forwarded header | Kim Alvefur | 2023-06-03 | 1 | -0/+21 |
| | | | | | | | | | | | | | | | | Standardized and structured replacement for the X-Forwarded-For, X-Forwarded-Proto set of headers. Notably, this allows per-hop protocol information, unlike X-Forwarded-Proto which is always a single value for some reason. | ||||
* | | util.sasl: Add basic tests for OAUTHBEARER | Kim Alvefur | 2023-05-26 | 1 | -0/+32 |
| | | |||||
* | | util.jsonschema: Update test suite ignore rules | Kim Alvefur | 2023-05-20 | 1 | -5/+6 |
| | | | | | | | | A test case was added in the middle, so all these need to be reordered. | ||||
* | | util.jsonschema: Fix UTF-8ness of 'minLength' and 'maxLength' | Kim Alvefur | 2023-04-23 | 1 | -2/+0 |
| | | |||||
* | | util.jsonschema: Implement 'minContains' and 'maxContains' | Kim Alvefur | 2023-04-23 | 1 | -2/+0 |
| | | |||||
* | | util.jsonschema: Tweak description of disabled test | Kim Alvefur | 2023-04-22 | 1 | -1/+1 |
| | | | | | | | | | | | | This doesn't fail because of additionalProperties, looks more like some issue with recursive definitions and util.jsonpointer that I don't want feel like investigating now. | ||||
* | | util.jsonschema: Enable passing IEEE 754 equality test | Kim Alvefur | 2023-04-22 | 1 | -1/+0 |
| | | |||||
* | | util.error: Add test for #1805 | Kim Alvefur | 2023-04-19 | 1 | -0/+3 |
| | | | | | | | | Checks that it doesn't fail on a stanza without <error> tag | ||||
* | | util.human.io: Add parse_duration() method to parse a duration string | Matthew Wild | 2023-04-07 | 1 | -0/+18 |
| | | | | | | | | | | Similar logic occurs throughout various modules in the codebase. We might even want a module:get_option_duration()?? | ||||
* | | integration tests: Preserve unmocked time.monotonic() | Matthew Wild | 2023-04-06 | 1 | -6/+5 |
| | | | | | | | | | | | | | | | | | | | | With monotonic() frozen, timers may fail to trigger. This caused problems after the new util.startup changes that moved the server-started event to a timer. The timer wouldn't trigger, the event didn't fire, and prosody would fail to daemonize. All the tests that depend on specific time behaviour are depending on wall clock time, so only mocking util.time.now() and os.time() fixes those. | ||||
* | | util.fsm: New utility lib for finite state machines | Matthew Wild | 2022-03-17 | 1 | -0/+250 |
| | | |||||
* | | util.jsonschema: Implement 'dependentSchemas' | Kim Alvefur | 2023-03-26 | 1 | -1/+1 |
| | | | | | | | | | | If this object key exists then this schema must validate against the current object. Seems useful. | ||||
* | | util.jsonschema: Implement 'dependentRequired' | Kim Alvefur | 2023-03-26 | 1 | -1/+0 |
| | | | | | | | | If this field exists, then these fields must also exist. | ||||
* | | util.format: Update tests for serialization changes | Kim Alvefur | 2023-03-26 | 1 | -5/+5 |
| | | |||||
* | | scansion: Enable mod_debug_reset during tests | Matthew Wild | 2023-03-23 | 1 | -0/+3 |
| | |