forked from cleveragents/cleveragents-core
56 lines
2.5 KiB
Gherkin
56 lines
2.5 KiB
Gherkin
Feature: Stream Router additional uncovered branches
|
|
As a developer
|
|
I want Behave scenarios that exercise uncovered stream_router branches
|
|
So that coverage increases for critical operator paths
|
|
|
|
Background:
|
|
Given the CleverAgents reactive system is available
|
|
|
|
Scenario: LangGraph operator uses bridge factory when available
|
|
Given a LangGraph bridge stub is registered on the stream router
|
|
When I build a graph_execute operator through the bridge
|
|
Then the bridge factory should be invoked and map data
|
|
|
|
Scenario: Map operator processes message through registered agent
|
|
Given a dummy agent is registered on the stream router
|
|
When I map a message using that agent
|
|
Then the agent-mapped content should be returned with metadata
|
|
|
|
Scenario: Filter operator passes matching condition
|
|
When I build a filter operator with equals condition
|
|
Then the filter should emit only matching values
|
|
|
|
Scenario: Transform operator with fn string executes successfully
|
|
When I build a transform operator with a valid function string
|
|
Then the transform should emit the computed value
|
|
|
|
Scenario: Switch operator handles case operators pipeline
|
|
When I run a switch operator with a case operator pipeline
|
|
Then the switch case should apply its operators
|
|
|
|
Scenario: Switch operator routes to a target stream case
|
|
Given I have an existing target stream named "case_target"
|
|
When I run a switch operator that routes to that case target
|
|
Then the case target stream should receive the message
|
|
|
|
Scenario: Unknown operator raises routing error
|
|
When I build an operator with an unknown type
|
|
Then I should get a stream routing error about unknown operator
|
|
|
|
Scenario: Extract field transform returns requested value and fallback
|
|
When I apply an extract_field transform to different message types
|
|
Then the transform should return the field value or original message
|
|
|
|
Scenario: Evaluate condition supports equals and field branches
|
|
When I evaluate equals and field conditions
|
|
Then both condition checks should return true
|
|
|
|
Scenario: Append accumulator returns unchanged when accumulator is not a list
|
|
When I apply the append accumulator to a non-list accumulator
|
|
Then the accumulator should be returned unchanged
|
|
|
|
Scenario: Setup subscriptions skips missing sources and subscribes existing
|
|
Given I prepare stream config with existing and missing subscriptions
|
|
When I setup subscriptions for that config
|
|
Then only existing sources should be subscribed
|