Skip to content

QDB-16632 - Automatically detect whether encryption is enabled or not for the Python tests#94

Merged
igorniebylski merged 2 commits intomasterfrom
sc-16632/automatically-detect-whether-encryption-is-enabled-or-not-for-the-python-tests
May 7, 2025
Merged

QDB-16632 - Automatically detect whether encryption is enabled or not for the Python tests#94
igorniebylski merged 2 commits intomasterfrom
sc-16632/automatically-detect-whether-encryption-is-enabled-or-not-for-the-python-tests

Conversation

@igorniebylski
Copy link
Contributor

@igorniebylski igorniebylski requested review from Copilot and solatis May 7, 2025 09:50
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR updates the test suite to automatically detect whether encryption is enabled by replacing hard-coded True values with a dynamic retrieval from the test settings.

  • Updated tests to use qdbd_settings["security"]["enable_encryption"] instead of a hard-coded value
  • Updated the settings in conftest.py to derive the encryption flag from an environment variable

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

File Description
tests/test_stats.py Replaces hard-coded True with settings-based encryption flag
tests/test_node.py Consistently retrieves enable_encryption from test settings
tests/test_connection.py Applies the same dynamic encryption configuration in connection tests
tests/conftest.py Introduces the environment variable QDB_ENCRYPT_TRAFFIC for encryption flag

user_private_key=qdbd_settings.get("security").get("user_private_key"),
cluster_public_key=qdbd_settings.get("security").get("cluster_public_key"),
enable_encryption=True,
enable_encryption=qdbd_settings.get("security").get("enable_encryption"),
Copy link

Copilot AI May 7, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Consider defining a fixture or local variable to retrieve the encryption flag once, rather than repeating qdbd_settings.get("security").get("enable_encryption") in multiple tests.

Copilot uses AI. Check for mistakes.
@igorniebylski igorniebylski merged commit 2ca80a3 into master May 7, 2025
2 checks passed
@igorniebylski igorniebylski deleted the sc-16632/automatically-detect-whether-encryption-is-enabled-or-not-for-the-python-tests branch May 7, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants