-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest-qrcode.sh
More file actions
63 lines (53 loc) · 1.86 KB
/
Copy pathtest-qrcode.sh
File metadata and controls
63 lines (53 loc) · 1.86 KB
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#!/bin/bash
# Test QR Code Generation Endpoint
echo "=== Testing QR Code Generation ==="
echo ""
# Test 1: Text QR Code
echo "Test 1: Generating text QR code..."
curl -X POST http://localhost:8080/api/v1/qrcode \
-H "Content-Type: application/json" \
-d '{"type":"text","content":"Hello World","size":256}' \
-o qrcode-text.png
echo "Saved to qrcode-text.png"
echo ""
# Test 2: URL QR Code
echo "Test 2: Generating URL QR code..."
curl -X POST http://localhost:8080/api/v1/qrcode \
-H "Content-Type: application/json" \
-d '{"type":"url","content":"https://www.google.com","size":256}' \
-o qrcode-url.png
echo "Saved to qrcode-url.png"
echo ""
# Test 3: WiFi QR Code
echo "Test 3: Generating WiFi QR code..."
curl -X POST http://localhost:8080/api/v1/qrcode \
-H "Content-Type: application/json" \
-d '{"type":"wifi","content":"MyNetwork","password":"MyPassword123","size":256}' \
-o qrcode-wifi.png
echo "Saved to qrcode-wifi.png"
echo ""
# Test 4: Email QR Code
echo "Test 4: Generating email QR code..."
curl -X POST "http://localhost:8080/api/v1/qrcode?subject=Hello&body=Test%20message" \
-H "Content-Type: application/json" \
-d '{"type":"email","content":"test@example.com","size":256}' \
-o qrcode-email.png
echo "Saved to qrcode-email.png"
echo ""
# Test 5: SMS QR Code
echo "Test 5: Generating SMS QR code..."
curl -X POST "http://localhost:8080/api/v1/qrcode?body=Hello%20from%20QR" \
-H "Content-Type: application/json" \
-d '{"type":"sms","content":"+1234567890","size":256}' \
-o qrcode-sms.png
echo "Saved to qrcode-sms.png"
echo ""
# Test 6: Phone QR Code
echo "Test 6: Generating phone QR code..."
curl -X POST http://localhost:8080/api/v1/qrcode \
-H "Content-Type: application/json" \
-d '{"type":"phone","content":"+1234567890","size":256}' \
-o qrcode-phone.png
echo "Saved to qrcode-phone.png"
echo ""
echo "=== All tests completed ==="