summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
6 daysmigration: rehash during migrate-db #81eltrac
10 daystest: create dummy file before delete, to avoid test failureeltrac
10 daystest, webhook: tidy up webhook; add testseltrac
- (send-webhook) does not need to validate URLs; (trigger) already does that; replace validation logic with :pre conditional - (make-request) does not need to fallback to empty string when event-key is nil. it should never be nil.
10 daystest, downloader: tidy up downloader and add testseltrac
- simplify (.mkdirs parent-dir) and with (io/make-parents file) - should return false when HTTP request fails, not nil - check if corrputed file exitsts before deleting it - add tests
10 daystest, migration: test edn-jf2ify; test throwable handling during migrationeltrac
11 daysall: use JF2 as a single source of truth, compile ↵eltrac
microformats/JSON-LD/<meta> to JF2 (#80) closes #75 This is a large squash commit. For details, see https://codeberg.org/eltrac/weepinbell/pulls/80
2026-10-24storage: query result is always in chronological order #79eltrac
2026-10-24retriever: fix not parsing numeric string to number before paging #79eltrac
2026-10-23storage: migrate from SQLite to H2eltrac
add ADR-0002 about migrating to H2
2026-10-18receiver: use http response utilities to replace response mapseltrac
fix test cases
2026-10-16Implement SQLite storage #7 (#73)eltrac
- new config `:storage-type` (default `:edn`, also support `:sqlite`) - `LICENSE` change: add exceptions to `next.jdbc` (which uses EPL) Reviewed-on: https://codeberg.org/eltrac/weepinbell/pulls/73
2026-10-16test: improve coverage #28eltrac
- storage-test: worker should handle other storage operations if some of them throws Exception - storage-test: microformats and proxied-photo should be stored as is - microformats-test: use-prop shuold handle both string and keyword typed keys - comment unused http client functions
2026-10-15test: test concurrent proceesor; assert config option typeseltrac
2026-10-15core: allow configuring minimal log level, default :infoeltrac
- refactored weepinbell.core/start-system. moved config loading outside start-system, loaded in -main function. - use :log-level in config and set timbre :min-level in -main
2026-10-15test: remove http request retries from testseltrac
2026-10-15processor: concurrently starts multiple pipeline loopseltrac
2026-10-14core, storage: add storage worker that handles writes asynchronously and ↵eltrac
thread-safely fix
2026-10-13style: cljfmt everythingeltrac
2026-10-13wrapper: fix not downloading photo with relative urlseltrac
2026-10-13retriever, test: refactor retriever; accurate MF type matchingeltrac
- microformats type inferring is more accurate - before: check if microformats h-entry has a type key (:like-of, :in-reply-to...) - now: check if such key's value equals to target URL, so it makes sure this like/reply/repost/rsvp is sent to this target - use ring.util.http-response to simplify response - `?mftype=` filter no longer depends on microformats reduction - retriever.clj is overall cleaner
2026-10-13test: add basic test suite for storage layereltrac
also remove post-conditional assertion from edn-storage/use-store, since tests have that covered
2026-10-10test, doc: fix failed tests; update coverage badge manuallyeltrac
2026-10-10test: cover most forms of retriever; set shorter http timeout in verifier testeltrac
2026-10-10test: fix config-test erroreltrac
2026-10-10test: cover config, core, webserver; add edge cases in existing testseltrac
- test loading and merging config - test start-system and graceful shutdown - test /endpoint and /api/send - test receiver handling nil input - test webserver startup and graceful shutdown
2026-10-09mf.searcher: find-type now recursively search in childreneltrac
add recursive find-type tests
2026-10-08fe: backend should be frontend-agnosticeltrac
2026-10-07handler: add /api/count #48eltrac
2026-10-07test: fix failed test due to non-existing namespaceeltrac
2026-10-07test, verifier, utils: fix failed testseltrac
- some namespaces tests require did not get renamed - url/extract might throw AssertionError if input contains non-HTTP(S) urls. it should not check schemes. - verifier doesn't need to filter non-HTTP(S) urls since they will return false anyway, and plus it makes localhost urls in tests fail
2026-10-07handler: pluggable services in API routes/handlerseltrac
2026-10-07receiver, verifier, retriever, storage: URL normalizationeltrac
utils: add url utilities for accurate comparison - add url/normalize taht reconstructs URL, strips unnecessary components, reorders query string and ensures determinism - add url/url= that uses url/normalize receiver: normalize URLs before checking and putting in queue - use url= and normalize from utils.url - rename verify-request to check-request to avoid confusion with verifier.clj verifier: check if source includes target URL more accurately - implement url/extract with robinst/autolink-java, which extracts a vector a URLs from string - check if source includes target by 1. extracting all links from source body 2. normalizing all links before comparing with target link (with url= func) - refactor verify-headers -> match-content-types, with a higher order function and clearer description retriever, storage: use url= instead of = when comparing urls
2026-10-06core, processor: refactor startup; graceful shutdowneltrac
- implement a functional rewrite of core.clj, no more `def`, no more states. callable from an REPL - handle SIGINT/SIGTERM and perform graceful shutdown - print clear logs when starting up and shutting down
2026-10-04API: remove typed APIeltrac
- /api/likes removed - /api/replies removed - /api/reposts removed
2026-10-04fe: new frontend in cljs, pluggable #8eltrac
- remove deprecated weepinbell.ui - create a ClojureScript project named bellsprout - use vanilla cljs and Pico CSS - can find and send webmentions in/to weepinbell - display webmentions in cards - <noscript> reminder - embed frontend in weepinbell - opt-in, weepinbell can work without a frontend - serve static files from disk for now; might support a simple reverse proxy in the future - test frontend route (OK when enabled; 404 when disabled) fe: ?show param that shows webmentions when set to true equivalent of clicking "Find" button manually
2026-10-04test: /api/mentions/ should not be malformed #28eltrac
2026-09-27test: assert hooks values are functionseltrac
2026-09-27webhook: fix AssertionError when event keys are not complete in user's configeltrac
2026-09-24test: improve test coverage #28eltrac
- remove reducer spec warninns, test spec before compiling instead. - cover more forms of webhook.clj, webhook_presets.clj, microformats/reducer.clj, microformats/searcher.clj, http/downloader.clj - remove unused code from config.clj - format all tests
2026-09-23processor: refactor processor; replace mf2j with mf2cljeltrac
- replace mf2j with mf2clj - remove utils.clj completely - refactored processor, use Chain of Responsibilities pattern and pass around maps to reuse data (so we don't have to make a separate HTTP request just to parse microformats, etc.) - test: add more test cases to verifier test - test: add basic test cases to all processing steps - add more logging to each processing steps. good for debugging.
2026-09-23test: 100% coverage of feed.cljeltrac
2026-09-23test: do not disable logging for they're part of code that tests should covereltrac
2026-09-23test: cover error handling and more edge cases of verifier #28eltrac
2026-09-19test: fix processor test failure and server not shutting down when test ↵eltrac
throws error
2026-09-19processor, webhook: send webhooks with customizable payloadeltrac
- processor will call hook functions with webmention data - refactor webhook.clj massively - add dynamic parameter substitution for urls, e.g. {source} {target} {event}...... - add config option :webhook-request, a function with parameters [hook, data] that returns a map (resembling {:headers ... :body ...}). webhook.clj uses this function to generate payload. - allow map besids URL string in config option :webhook. if it's a URL, sends webhook request to it with payload generated by :webhook-request; if it's a map, it should be like {:url ... :request-fn ...}, which specifies a payload generator. - add request-fn preset :ntfy
2026-09-16wrapper, storage, mf: add spec check and improve project structureeltrac
wrapper: use spec to check webmention data before writing to storage warn when data does not meet spec (corrupted). for now we're not dealing with corruption, just collect logs and analyze. microformats: use spec to validate data and warn if it's in bad form microformats: move parsers/wrappers to one sub-directory storage: move weepinbell.spec to weepinbell.storage.spec
2026-09-16style: format the codebaseeltrac
starting from now, every commit should be cljfmt-fixed
2026-09-14tests: disable logging in testseltrac
2026-09-14storage-test: running tests no longer generates unwanted 'source.edn' fileeltrac
the old weepinbell.storage-test/edn-storage-conformity-test `spit` a file for `edn-storage/use-store` to check if data file exists this is unnecessary and annoying because it generates a confusing file every time tests are run, also during building. the solution is to use `with-redefs` to make `file-exists?` always return `true`
2026-09-11fix(test): test fails because fake data file does not existeltrac