Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/packages/devui/agent_framework_devui/_deployment.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,8 @@ async def _generate_dockerfile(self, entity_path: Path, config: DeploymentConfig
ENV PORT=8080
EXPOSE 8080

# Launch DevUI with auth enabled (token from environment variable)
CMD ["devui", "/app/entity", "--mode", "{config.ui_mode}", "--host", "0.0.0.0", "--port", "8080", "--auth"]
# Launch DevUI. Auth is enabled by default and reads the token from the environment.
CMD ["devui", "/app/entity", "--mode", "{config.ui_mode}", "--host", "0.0.0.0", "--port", "8080"]
"""

dockerfile_path = entity_path / "Dockerfile"
Expand Down
27 changes: 27 additions & 0 deletions python/packages/devui/tests/devui/test_deployment.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Copyright (c) Microsoft. All rights reserved.

"""Focused tests for DevUI deployment helpers."""

from pathlib import Path

from agent_framework_devui._deployment import DeploymentManager
from agent_framework_devui.models._discovery_models import DeploymentConfig


async def test_generate_dockerfile_omits_auth_flag_from_cmd(tmp_path: Path) -> None:
"""Dockerfile generation must not emit the removed `--auth` CLI flag."""
manager = DeploymentManager()
config = DeploymentConfig(
entity_id="test-agent",
resource_group="test-rg",
app_name="test-app",
region="eastus",
ui_mode="user",
)

dockerfile_path = await manager._generate_dockerfile(tmp_path, config)
dockerfile_content = dockerfile_path.read_text()

assert 'CMD ["devui", "/app/entity", "--mode", "user", "--host", "0.0.0.0", "--port", "8080"]' in dockerfile_content
assert '"--auth"' not in dockerfile_content
assert "DEVUI_AUTH_TOKEN" not in dockerfile_content
Loading