-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_product_management.sh
More file actions
40 lines (32 loc) Β· 1013 Bytes
/
test_product_management.sh
File metadata and controls
40 lines (32 loc) Β· 1013 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/bash
echo "π§ͺ Testing Product Management Functions"
echo "======================================"
cd icp_backend
echo "π Testing canister status..."
dfx canister call supply_chain_backend get_canister_status
echo ""
echo "π¦ Testing get_all_products..."
dfx canister call supply_chain_backend get_all_products
echo ""
echo "π€ Testing get_user_products..."
dfx canister call supply_chain_backend get_user_products
echo ""
echo "π Testing analytics..."
dfx canister call supply_chain_backend get_analytics
echo ""
echo "π Testing search_products..."
dfx canister call supply_chain_backend search_products '(record {
name=null;
category=null;
manufacturer=null;
status=null;
limit=opt 10
})'
echo ""
echo "β
Product management tests complete!"
echo ""
echo "π‘ If you see empty results, register some products first:"
echo "1. Go to http://localhost:3000/register"
echo "2. Connect your Internet Identity"
echo "3. Register a product"
echo "4. Check the dashboard"