Files
cleveragents-core/features/protocol_handler_coverage_r3.feature
T
freemo 31472b5413
CI / benchmark-publish (pull_request) Has been skipped
CI / build (pull_request) Successful in 21s
CI / helm (pull_request) Successful in 22s
CI / lint (pull_request) Successful in 3m20s
CI / quality (pull_request) Successful in 3m43s
CI / typecheck (pull_request) Successful in 3m58s
CI / security (pull_request) Successful in 4m8s
CI / integration_tests (pull_request) Successful in 9m33s
CI / unit_tests (pull_request) Successful in 10m12s
CI / docker (pull_request) Successful in 1m28s
CI / coverage (pull_request) Successful in 12m18s
CI / e2e_tests (pull_request) Successful in 19m51s
CI / status-check (pull_request) Successful in 1s
CI / build (push) Successful in 15s
CI / helm (push) Successful in 22s
CI / lint (push) Successful in 3m18s
CI / quality (push) Successful in 3m41s
CI / typecheck (push) Successful in 3m57s
CI / benchmark-regression (push) Has been skipped
CI / security (push) Successful in 4m10s
CI / unit_tests (push) Failing after 6m58s
CI / docker (push) Has been skipped
CI / integration_tests (push) Successful in 9m15s
CI / coverage (push) Successful in 12m26s
CI / e2e_tests (push) Successful in 23m11s
CI / status-check (push) Failing after 1s
CI / benchmark-publish (push) Successful in 28m31s
CI / benchmark-regression (pull_request) Successful in 54m53s
test(coverage): add Behave scenarios for 39 under-covered modules
Add Behave feature/step pairs that exercise uncovered branches across handlers, LSP, CLI, and service layers to reach the coverage gate.

ISSUES CLOSED: #1232
2026-03-31 21:47:12 +00:00

94 lines
4.4 KiB
Gherkin
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
Feature: ResourceHandler protocol coverage (resource/handlers/protocol.py)
Exercise uncovered lines in src/cleveragents/resource/handlers/protocol.py:
- Line 76: Content.text raises ValueError for binary (encoding=None)
- Line 236: ResourceHandler.resolve default stub
- Line 254: ResourceHandler.read default stub
- Line 271: ResourceHandler.write default stub
- Line 288: ResourceHandler.delete default stub
- Line 299: ResourceHandler.list_children default stub
- Line 311: ResourceHandler.diff default stub
- Line 315: ResourceHandler.discover_children default stub
- Line 327: ResourceHandler.create_sandbox default stub
- Line 338: ResourceHandler.create_checkpoint default stub
- Line 349: ResourceHandler.rollback_to default stub
- Line 360: ResourceHandler.project_access default stub
# -----------------------------------------------------------------
# Content.text property binary content raises ValueError (line 76)
# -----------------------------------------------------------------
Scenario: Content.text raises ValueError when encoding is None
Given phcov a Content instance with binary data and encoding None
When phcov the text property is accessed
Then phcov a ValueError should be stored with message "Cannot decode binary content as text"
# -----------------------------------------------------------------
# ResourceHandler Protocol default method stubs (lines 236360)
# -----------------------------------------------------------------
Scenario: ResourceHandler.resolve default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the resolve method is called
Then phcov the result should be None
Scenario: ResourceHandler.read default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the read method is called
Then phcov the result should be None
Scenario: ResourceHandler.write default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the write method is called
Then phcov the result should be None
Scenario: ResourceHandler.delete default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the delete method is called
Then phcov the result should be None
Scenario: ResourceHandler.list_children default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the list_children method is called
Then phcov the result should be None
Scenario: ResourceHandler.diff default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the diff method is called
Then phcov the result should be None
Scenario: ResourceHandler.discover_children default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the discover_children method is called
Then phcov the result should be None
Scenario: ResourceHandler.create_sandbox default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the create_sandbox method is called
Then phcov the result should be None
Scenario: ResourceHandler.create_checkpoint default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the create_checkpoint method is called
Then phcov the result should be None
Scenario: ResourceHandler.rollback_to default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the rollback_to method is called
Then phcov the result should be None
Scenario: ResourceHandler.project_access default stub returns None
Given phcov a bare ResourceHandler protocol subclass instance
And phcov a dummy Resource and SandboxManager
When phcov the project_access method is called
Then phcov the result should be None