Skip to content

Update agent disable/enable tests, following service fix#47580

Merged
dargilco merged 6 commits into
feature/azure-ai-projects/2.3.0from
dargilco/fix-agent-disable-enable-tests
Jun 27, 2026
Merged

Update agent disable/enable tests, following service fix#47580
dargilco merged 6 commits into
feature/azure-ai-projects/2.3.0from
dargilco/fix-agent-disable-enable-tests

Conversation

@dargilco

@dargilco dargilco commented Jun 19, 2026

Copy link
Copy Markdown
Member

This pull request updates the agent enable/disable logic and refines the associated tests to ensure correct error handling and endpoint coverage. It also updates .env.template with missing environment variables.

I verified that the 2 bugs I reported were fixed:

  1. Service now returns 204 instead of 200 on success of agent enable/disable, as per TypeSpec
  2. Agent enable/disable works on Project Endpoint as well as Agent Endpoint. Previously it only worked on Agent Endpoint.

Agent enable/disable logic and error handling:

  • Changed the allowed HTTP status codes for agent enable and disable operations to only accept 204 (No Content), ensuring stricter compliance with expected API responses. [1] [2] [3] [4]
  • Updated both sync and async tests in test_agents_crud.py and test_agents_crud_async.py to:
    • Use the input parameter instead of creating conversations for agent response tests.
    • Explicitly check for PermissionDeniedError when calling a disabled agent, ensuring the agent properly rejects requests when disabled. [1] [2] [3] [4] [5] [6]
    • Clean up any existing agents before running tests to avoid conflicts. [1] [2]

Test coverage improvements:

  • The sync test now uses the agent endpoint and the async test uses the project endpoint for responses, ensuring both code paths are exercised. [1] [2]

Configuration and asset updates:

  • Added FABRIC_IQ_PROJECT_CONNECTION_ID and FABRIC_IQ_USER_INPUT to .env.template for new configuration options.
  • Updated the asset tag in assets.json to a new version.

@dargilco
dargilco merged commit 427b999 into feature/azure-ai-projects/2.3.0 Jun 27, 2026
21 checks passed
@dargilco
dargilco deleted the dargilco/fix-agent-disable-enable-tests branch June 27, 2026 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant