Skip to content

Commit 6ff6435

Browse files
committed
Fix the load test
1 parent a8f69b8 commit 6ff6435

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

api/cmd/loadtest/main.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ import (
66
"log"
77
"os"
88

9+
"github.com/google/uuid"
10+
911
"github.com/joho/godotenv"
1012

1113
"github.com/carlmjohnson/requests"
@@ -25,12 +27,12 @@ func main() {
2527
Host("api.httpsms.com").
2628
// Host("localhost:8000").
2729
// Scheme("http").
28-
Header("x-api-key", os.Getenv("HTTPSMS_API_KEY")).
30+
Header("x-api-key", os.Getenv("HTTPSMS_KEY")).
2931
BodyJSON(&map[string]string{
30-
"content": fmt.Sprintf("testing http api sample: [%d]", i),
31-
"from": os.Getenv("SIM_1"),
32-
"to": os.Getenv("SIM_2"),
33-
"sim": "SIM2",
32+
"content": fmt.Sprintf("Load Test[%d]", i),
33+
"from": os.Getenv("HTTPSMS_FROM"),
34+
"to": os.Getenv("HTTPSMS_TO"),
35+
"request_id": fmt.Sprintf("load-%s-%d", uuid.NewString(), i),
3436
}).
3537
ToString(&responsePayload).
3638
Fetch(context.Background())

0 commit comments

Comments
 (0)