From 7b418aba88729e1695fafa1f7deb8bd2bf4e0714 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 8 Feb 2019 11:51:19 -0800 Subject: [PATCH 1/4] Add system test for KMS --- ...system_key_management_service_client_v1.py | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py diff --git a/kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py b/kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py new file mode 100644 index 000000000000..068e62f61fb0 --- /dev/null +++ b/kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py @@ -0,0 +1,30 @@ +# -*- coding: utf-8 -*- +# +# Copyright 2019 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# https://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +import os + +from google.cloud import kms_v1 + + +class TestKeyManagementServiceClient(object): + def test_list_global_key_rings(self): + project_id = os.environ["PROJECT_ID"] + + client = kms_v1.KeyManagementServiceClient() + location = "global" + parent = client.location_path(project_id, location) + response = client.list_key_rings(parent) + response_list = list(response) \ No newline at end of file From c134f76203c00d83588d4754ce32a97d28422b93 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 8 Feb 2019 12:15:25 -0800 Subject: [PATCH 2/4] Rename file --- ...st_system_key_management_service_client_v1.py => system.py} | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) rename kms/tests/{system/gapic/v1/test_system_key_management_service_client_v1.py => system.py} (91%) diff --git a/kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py b/kms/tests/system.py similarity index 91% rename from kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py rename to kms/tests/system.py index 068e62f61fb0..d151f54ba2a5 100644 --- a/kms/tests/system/gapic/v1/test_system_key_management_service_client_v1.py +++ b/kms/tests/system.py @@ -26,5 +26,4 @@ def test_list_global_key_rings(self): client = kms_v1.KeyManagementServiceClient() location = "global" parent = client.location_path(project_id, location) - response = client.list_key_rings(parent) - response_list = list(response) \ No newline at end of file + response = client.list_key_rings(parent) \ No newline at end of file From 178a4ec554b998995d530a06b33d6adf68cba0ec Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Fri, 8 Feb 2019 13:07:00 -0800 Subject: [PATCH 3/4] Blacken --- kms/tests/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kms/tests/system.py b/kms/tests/system.py index d151f54ba2a5..773bdb7514e7 100644 --- a/kms/tests/system.py +++ b/kms/tests/system.py @@ -26,4 +26,4 @@ def test_list_global_key_rings(self): client = kms_v1.KeyManagementServiceClient() location = "global" parent = client.location_path(project_id, location) - response = client.list_key_rings(parent) \ No newline at end of file + response = client.list_key_rings(parent) From 69009c22fa8aee131da9666d875b58d0c380f510 Mon Sep 17 00:00:00 2001 From: Bu Sun Kim Date: Tue, 12 Feb 2019 11:10:22 -0800 Subject: [PATCH 4/4] Fix lint --- kms/tests/system.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kms/tests/system.py b/kms/tests/system.py index 773bdb7514e7..4a23908dc337 100644 --- a/kms/tests/system.py +++ b/kms/tests/system.py @@ -26,4 +26,4 @@ def test_list_global_key_rings(self): client = kms_v1.KeyManagementServiceClient() location = "global" parent = client.location_path(project_id, location) - response = client.list_key_rings(parent) + client.list_key_rings(parent)