Skip to content

Commit 5403d06

Browse files
fix(lgtm-datamesh): smoke and seed orders post an unstocked SKU
smoke-order.sh and the bootstrap seed step both POST SKU-ABC-42, which inventory-service never seeds (DEMO_STOCK has only WIDGET-001 and WIDGET-OOS), so order-service's r23 stock validation rejects the order with 409 every time. smoke-order can never pass as written, and the bootstrap's seed curl lacks -f, so its '✓ seed order placed' printed success for a rejected order. Switch both to the seeded WIDGET-001 and add -f so the seed step's fallback message fires on rejection instead of a false checkmark. Verified live: POST with WIDGET-001 returns 201; SKU-ABC-42 returns 409. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 140a6a6 commit 5403d06

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

‎examples/lgtm-datamesh/demos/smoke-order.sh‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ echo "$healthz" | grep -q '"status":"ready"' || fail "/healthz not ready: $healt
155155
step "POST a new order"
156156
created=$(curl -fsS -X POST "$BASE/orders" \
157157
-H 'Content-Type: application/json' \
158-
-d '{"customer_id":"cust-1001","item_sku":"SKU-ABC-42","quantity":3,"amount":"59.97"}') \
158+
-d '{"customer_id":"cust-1001","item_sku":"WIDGET-001","quantity":3,"amount":"59.97"}') \
159159
|| fail "POST /orders failed"
160160
order_id=$(echo "$created" | python3 -c 'import json,sys; print(json.load(sys.stdin)["id"])') \
161161
|| fail "could not parse order id from: $created"

‎examples/lgtm-datamesh/scripts/bootstrap-capstone.sh‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,9 +134,9 @@ ok "core services Ready"
134134
step "Seeding one order (gives the catalog data to ingest)"
135135
kubectl port-forward -n "$NS" svc/order-service 18080:80 >/dev/null 2>&1 &
136136
SEED_PF=$!; sleep 3
137-
curl -s -o /dev/null --max-time 8 -X POST "http://127.0.0.1:18080/orders" \
137+
curl -fs -o /dev/null --max-time 8 -X POST "http://127.0.0.1:18080/orders" \
138138
-H 'Content-Type: application/json' \
139-
--data '{"customer_id":"cust-1001","item_sku":"SKU-ABC-42","quantity":1,"amount":19.99}' \
139+
--data '{"customer_id":"cust-1001","item_sku":"WIDGET-001","quantity":1,"amount":19.99}' \
140140
&& ok "seed order placed" || printf ' (seed skipped — place one later via smoke-order.sh)\n'
141141
kill "$SEED_PF" 2>/dev/null || true
142142

0 commit comments

Comments
 (0)