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
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ uv run ${test_file} \
--conformance_input=test_data/flower_shop/conformance_input.json \
--fixture_config=test_data/flower_shop/test_fixtures.json
done

# Or, if you prefer:
SERVER_URL=http://localhost:${MERCHANT_SERVER_PORT} SIMULATION_SECRET=${SIMULATION_SECRET} uv run pytest
```

### Customizing Test Fixtures
Expand Down
20 changes: 20 additions & 0 deletions conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Copyright 2026 UCP Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

"""Configuration file for pytest."""

from integration_test_utils import FLAGS


FLAGS(["pytest"])
7 changes: 5 additions & 2 deletions integration_test_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
import csv
import json
import logging
import os
from pathlib import Path
import threading
import time
Expand Down Expand Up @@ -57,10 +58,12 @@ class UnifiedUpdate(CheckoutUpdateRequest):

FLAGS = flags.FLAGS
try:
flags.DEFINE_string("server_url", None, "Base URL of the server")
flags.DEFINE_string(
"server_url", os.getenv("SERVER_URL"), "Base URL of the server"
)
flags.DEFINE_string(
"simulation_secret",
str(uuid.uuid4()),
os.getenv("SIMULATION_SECRET", str(uuid.uuid4())),
"Secret for simulation endpoints",
)
flags.DEFINE_integer(
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ dependencies = [
"fastapi>=0.109.0",
"uvicorn[standard]>=0.38.0",
"ruff>=0.14.11",
"pytest>=8.0.0",
]

[dependency-groups]
Expand Down
Loading