🔧 chore(locustfile.py): remove hardcoded flow ID and replace it with the value from the FLOW_ID environment variable for flexibility and security
This commit is contained in:
parent
517a48f885
commit
15f6200477
1 changed files with 2 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ from locust import FastHttpUser, task, between
|
|||
import random
|
||||
import time
|
||||
from rich import print
|
||||
import os
|
||||
|
||||
|
||||
class NameTest(FastHttpUser):
|
||||
|
|
@ -28,9 +29,7 @@ class NameTest(FastHttpUser):
|
|||
@task
|
||||
def send_name_and_check(self):
|
||||
name = random.choice(self.names)
|
||||
flow_id = (
|
||||
"e56cca5e-4bf3-4103-9a18-d55dcea135ec" # Replace with appropriate flow ID
|
||||
)
|
||||
flow_id = os.getenv("FLOW_ID")
|
||||
session_id = f"{name}-{time.time()}"
|
||||
|
||||
def process(flow_id, payload):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue