fix(cli): resolve PR #1513 review blockers — fix actor add --update enforcement tests
Remove @tdd_expected_fail tags from actor_add_update_enforcement.feature and fix step invocations to use the new positional NAME argument signature for agents actor add. The fix for issue #1500 is already on master; these tests were failing only because they used the old command signature (without NAME). ISSUES CLOSED: #1500
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
# Regression tests for bug #2609: actor add must reject re-adding an existing
|
||||
# actor unless --update is provided.
|
||||
# Regression tests for bug #1500/#2609: actor add must reject re-adding an
|
||||
# existing actor unless --update is provided.
|
||||
Feature: agents actor add enforces --update flag for existing actors
|
||||
As a user of the CleverAgents CLI
|
||||
I want `agents actor add` to fail with a clear error when re-adding an existing actor
|
||||
|
||||
@@ -1,7 +1,11 @@
|
||||
"""Step definitions for actor add --update flag enforcement (issue #2609).
|
||||
"""Step definitions for actor add --update flag enforcement (issue #1500/#2609).
|
||||
|
||||
Tests that `agents actor add` rejects re-adding an existing actor without
|
||||
the --update flag, and succeeds when --update is provided.
|
||||
|
||||
The ``add`` command requires a positional NAME argument followed by
|
||||
``--config <FILE>``:
|
||||
agents actor add <NAME> --config <FILE> [--update]
|
||||
"""
|
||||
|
||||
from __future__ import annotations
|
||||
@@ -105,6 +109,7 @@ def step_when_add_without_update(context: Any) -> None:
|
||||
)
|
||||
registry.upsert_actor.return_value = context.new_actor
|
||||
mock_svc.return_value = (MagicMock(), registry)
|
||||
# The add command requires a positional NAME argument before --config
|
||||
context.result = context.runner.invoke(
|
||||
actor_app,
|
||||
["add", context.actor_name, "--config", str(context.actor_config_path)],
|
||||
@@ -120,6 +125,7 @@ def step_when_add_with_update(context: Any) -> None:
|
||||
# upsert_actor returns the updated actor
|
||||
registry.upsert_actor.return_value = context.updated_actor
|
||||
mock_svc.return_value = (MagicMock(), registry)
|
||||
# The add command requires a positional NAME argument before --config
|
||||
context.result = context.runner.invoke(
|
||||
actor_app,
|
||||
[
|
||||
|
||||
@@ -1111,4 +1111,3 @@ def set_default(
|
||||
# Sub-command groups
|
||||
# ---------------------------------------------------------------------------
|
||||
app.add_typer(actor_context_app, name="context")
|
||||
# Issue #1500: Actor add --update flag enforcement fix
|
||||
|
||||
Reference in New Issue
Block a user