Skip to content

Commit 902b3c9

Browse files
committed
timeseries, multimodal: Fixed codeql issues
Changes: tests - Fixed codeql issues Signed-off-by: Pooja Kumbharkar <pooja.kumbharkar@intel.com>
1 parent fb01901 commit 902b3c9

File tree

6 files changed

+16
-269
lines changed

6 files changed

+16
-269
lines changed

manufacturing-ai-suite/industrial-edge-insights-multimodal/tests/functional/test_docker_deployment_multimodal.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ def test_valid_values():
6363
if "S3_STORAGE_PASSWORD" not in case or not case["S3_STORAGE_PASSWORD"]:
6464
pytest.fail("S3_STORAGE_PASSWORD is missing or empty in generated credentials")
6565

66-
logger.info(f"Generated S3_STORAGE_USERNAME: {case['S3_STORAGE_USERNAME']}")
66+
logger.info(f"Generated S3_STORAGE_USERNAME: [REDACTED]")
6767
logger.info("Generated S3_STORAGE_PASSWORD: [REDACTED]")
6868

6969
env_file_path = os.path.join(constants.MULTIMODAL_APPLICATION_DIRECTORY, ".env")

manufacturing-ai-suite/industrial-edge-insights-multimodal/tests/functional/test_security.py

Lines changed: 0 additions & 259 deletions
This file was deleted.

manufacturing-ai-suite/industrial-edge-insights-time-series/tests/functional/conftest_docker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,7 @@ def setup_multimodal_environment(request):
146146
logger.error("S3_STORAGE_PASSWORD is missing or empty in generated credentials")
147147
pytest.fail("S3_STORAGE_PASSWORD missing during multimodal setup")
148148

149-
logger.info(f"Generated S3_STORAGE_USERNAME: {case['S3_STORAGE_USERNAME']}")
149+
logger.info(f"Generated S3_STORAGE_USERNAME: [REDACTED]")
150150

151151
env_file_path = os.path.join(multimodal_dir, ".env")
152152
if not docker_utils.update_env_file(env_file_path, case):

manufacturing-ai-suite/industrial-edge-insights-time-series/tests/utils/docker_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1723,7 +1723,7 @@ def execute_influxdb_commands(container_name="ia-influxdb", measurement=None):
17231723
)
17241724

17251725
exec_command = f"docker exec {container_name} {influx_commands}"
1726-
logger.info(f"Executing command: {exec_command}")
1726+
logger.info(f"Executing command: 'SHOW MEASUREMENTS; {query_part}' inside {container_name} container with redacted credentials.")
17271727

17281728
result = subprocess.run(exec_command, shell=True, capture_output=True, text=True)
17291729

@@ -1779,7 +1779,7 @@ def verify_influxdb_retention_docker(response=None, container_name=constants.CON
17791779
"-execute 'SELECT time, wind_speed FROM wind_turbine_data ORDER BY time ASC LIMIT 1' | awk 'NR==4 {print $1}'"
17801780
)
17811781
exec_command = f"docker exec {container_name} {influx_query}"
1782-
logger.info(f"Executing command: {exec_command}")
1782+
logger.info(f"Executing InfluxDB query inside container '{container_name}': 'SELECT time, wind_speed FROM wind_turbine_data ORDER BY time ASC LIMIT 1;' with redacted credentials.")
17831783
result = subprocess.run(exec_command, shell=True, capture_output=True, text=True)
17841784

17851785
if result.returncode != 0:

manufacturing-ai-suite/industrial-edge-insights-time-series/tests/utils/helm_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1391,7 +1391,7 @@ def verify_influxdb_retention(namespace, chart_path, response):
13911391
)
13921392

13931393
exec_command = f"kubectl exec -n {namespace} {pod_name} -- {influx_commands}"
1394-
logger.info(f"Executing command: {exec_command}")
1394+
logger.info(f"Executing InfluxDB query inside pod '{pod_name}': 'SELECT time, wind_speed FROM {constants.WIND_TURBINE_INGESTED_TOPIC} ORDER BY time ASC LIMIT 1;' with redacted credentials.")
13951395
result = subprocess.run(exec_command, shell=True, capture_output=True, text=True, check=True)
13961396
response = result.stdout.strip()
13971397

0 commit comments

Comments
 (0)