tests: SSE parsing + relay event handling, update AGENTS.md
- New test module test/RelaySpec.hs (20 tests):
- extractLines: line splitting, CRLF, partial lines, empty input
- foldLines: single/two push events, non-push ignored, comments, no-space colon,
partial state carry-over across batches
- parseEvent: valid push, non-push, malformed JSON, multi-line data
- handleSSEEvent: pull on matching repo, ignore wrong gitea_repo/branch,
skip pull when merge/rebase/operation in progress
- Exported PushEvent(..), extractLines, foldLines, parseEvent, handleSSEEvent
- Fixed data line order (append instead of prepend+reverse) and event ordering
- Updated AGENTS.md: relay architecture, Go component, new deps, file layout
This commit is contained in:
@@ -3,6 +3,7 @@ module Main (main) where
|
||||
import qualified GitCommitSpec
|
||||
import qualified GitPullSpec
|
||||
import qualified GitSafetySpec
|
||||
import qualified RelaySpec
|
||||
import Test.Hspec
|
||||
|
||||
main :: IO ()
|
||||
@@ -10,3 +11,4 @@ main = hspec $ do
|
||||
GitCommitSpec.spec
|
||||
GitPullSpec.spec
|
||||
GitSafetySpec.spec
|
||||
RelaySpec.spec
|
||||
|
||||
Reference in New Issue
Block a user