From 15f620047707c7d1f48b36ec6e5ef4d9a25384d9 Mon Sep 17 00:00:00 2001 From: Gabriel Luiz Freitas Almeida Date: Mon, 21 Aug 2023 13:46:35 -0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A7=20chore(locustfile.py):=20remove?= =?UTF-8?q?=20hardcoded=20flow=20ID=20and=20replace=20it=20with=20the=20va?= =?UTF-8?q?lue=20from=20the=20FLOW=5FID=20environment=20variable=20for=20f?= =?UTF-8?q?lexibility=20and=20security?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/locust/locustfile.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tests/locust/locustfile.py b/tests/locust/locustfile.py index a4d8b49c3..b3e6b58b0 100644 --- a/tests/locust/locustfile.py +++ b/tests/locust/locustfile.py @@ -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):