Skip to content

Commit c4fdd5c

Browse files
committed
test: add debug logs in test
1 parent 64cad49 commit c4fdd5c

3 files changed

Lines changed: 83 additions & 23 deletions

File tree

testcases/quickstart-agent/run.sh

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#!/bin/bash
2-
set -e
32

43
cd /app/testcases/quickstart-agent
54

@@ -11,22 +10,6 @@ uv sync
1110
echo "Authenticating with UiPath..."
1211
uv run uipath auth --client-id="$CLIENT_ID" --client-secret="$CLIENT_SECRET" --base-url="$BASE_URL"
1312

14-
# Load the auth configuration into environment
15-
# Check what uipath auth created
16-
echo "=== Checking auth artifacts ==="
17-
if [ -f ~/.config/uipath/auth.json ]; then
18-
echo "Auth config exists:"
19-
cat ~/.config/uipath/auth.json
20-
21-
# Extract and export the required environment variables
22-
export UIPATH_URL=$(jq -r '.base_url // .url // empty' ~/.config/uipath/auth.json)
23-
export UIPATH_ACCESS_TOKEN=$(jq -r '.access_token // .token // empty' ~/.config/uipath/auth.json)
24-
25-
echo "UIPATH_URL: $UIPATH_URL"
26-
echo "UIPATH_ACCESS_TOKEN: ${UIPATH_ACCESS_TOKEN:0:20}..."
27-
fi
28-
echo "==============================="
29-
3013
# Pack the agent
3114
echo "Packing agent..."
3215
uv run uipath pack

testcases/quickstart-agent/src/main.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,14 @@ class JokeFlow(Workflow):
2929
async def generate_joke(self, ev: TopicEvent) -> JokeEvent:
3030
topic = ev.topic
3131

32+
# Debug logging
33+
import os
34+
print(f"DEBUG: BASE_URL from env: {os.environ.get('UIPATH_URL', 'NOT SET')}")
35+
if hasattr(self.llm, '_client'):
36+
print(f"DEBUG: Client base URL: {self.llm._client._base_url}")
37+
if hasattr(self.llm, 'azure_endpoint'):
38+
print(f"DEBUG: Azure endpoint: {self.llm.azure_endpoint}")
39+
3240
prompt = f"Write your best joke about {topic}."
3341
response = await self.llm.acomplete(prompt)
3442
return JokeEvent(joke=str(response))

testcases/quickstart-agent/uv.lock

Lines changed: 75 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)