You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by GitBox <gi...@apache.org> on 2021/01/22 17:33:39 UTC
[GitHub] [airflow] TobKed commented on a change in pull request #13844: Improve environment variables in GCP Secret Manager test
TobKed commented on a change in pull request #13844:
URL: https://github.com/apache/airflow/pull/13844#discussion_r562791531
##########
File path: tests/providers/google/cloud/hooks/test_secret_manager_system.py
##########
@@ -15,18 +15,18 @@
# specific language governing permissions and limitations
# under the License.
-from unittest import TestCase
+import os
import pytest
from airflow.providers.google.cloud.hooks.secret_manager import SecretsManagerHook
from tests.providers.google.cloud.utils.gcp_authenticator import GCP_SECRET_MANAGER_KEY
from tests.test_utils.gcp_system_helpers import GoogleSystemTest, provide_gcp_context
-TEST_SECRET_ID = "test-secret"
-TEST_SECRET_VALUE = "test-secret-value"
-TEST_SECRET_VALUE_UPDATED = "test-secret-value-updated"
-TEST_MISSING_SECRET_ID = "test-missing-secret"
+TEST_SECRET_ID = os.environ.get("GCP_SECRET_MANAGER_SECRET_ID", "test-secret")
+TEST_SECRET_VALUE = os.environ.get("GCP_SECRET_MANAGER_SECRET_VALUE", "test-secret-value")
+TEST_SECRET_VALUE_UPDATED = os.environ.get("GCP_SECRET_MANAGER_VALUE_UPDATED", "test-secret-value-updated")
+TEST_MISSING_SECRET_ID = os.environ.get("GCP_SECRET_MANAGER_SECRET_ID", "test-missing-secret")
Review comment:
Yes! Thank you @subkanthi
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org