Skip to content

[Bug]: Conformance tests return 500 on all create_checkout calls against latest Flower Shop server #37

@sbeashwar

Description

@sbeashwar

Description

After PR #28 merged (SDK v0.3.0 migration), all conformance tests that call POST /checkout-sessions fail with 500 Internal Server Error when run against the latest Flower Shop server (Universal-Commerce-Protocol/samples@bdaa272).

57 out of 59 tests fail. Only test_discovery (profile validation) and test_discovery_urls (skipped) are unaffected.

Steps to Reproduce

# All repos at latest main
git clone https://github.com/Universal-Commerce-Protocol/conformance
git clone https://github.com/Universal-Commerce-Protocol/samples
git clone https://github.com/Universal-Commerce-Protocol/sdk

# Sync deps
uv sync --directory sdk/python/
uv sync --directory samples/rest/python/server/
uv sync --directory conformance/

# Init DB + start server
DATABASE_PATH=/tmp/ucp_test
mkdir -p $DATABASE_PATH
uv run --directory samples/rest/python/server import_csv.py \n  --products_db_path=$DATABASE_PATH/products.db \n  --transactions_db_path=$DATABASE_PATH/transactions.db \n  --data_dir=../../../../conformance/test_data/flower_shop

uv run --directory samples/rest/python/server server.py \n  --products_db_path=$DATABASE_PATH/products.db \n  --transactions_db_path=$DATABASE_PATH/transactions.db \n  --port=8182 --simulation_secret=super-secret-sim-key &

# Run tests
for test_file in conformance/*_test.py; do
  uv run $test_file \n    --server_url=http://localhost:8182 \n    --simulation_secret=super-secret-sim-key \n    --conformance_input=conformance/test_data/flower_shop/conformance_input.json
done

Expected

Tests pass (or at least create_checkout returns 201).

Actual

POST /checkout-sessions returns 500 for every request. The server appears to crash when parsing the request body with the updated SDK v0.3.0 models.

Environment

Notes

This likely means #28 was not tested end-to-end against the latest server before merging. A CI workflow that starts the server and runs the suite would prevent this (see PR #36).

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions