From 99e69e319f64905b33346782a2cc3f9ead529093 Mon Sep 17 00:00:00 2001 From: Julio Castillo Date: Fri, 24 Feb 2023 18:27:31 +0100 Subject: [PATCH] Update data platform tests --- .../data-platform-foundations/README.md | 13 ++++++++++ .../data_platform_foundations/__init__.py | 13 ---------- .../data_platform_foundations/fixture/main.tf | 25 ------------------ .../data_platform_foundations/test_plan.py | 26 ------------------- 4 files changed, 13 insertions(+), 64 deletions(-) delete mode 100644 tests/blueprints/data_solutions/data_platform_foundations/__init__.py delete mode 100644 tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf delete mode 100644 tests/blueprints/data_solutions/data_platform_foundations/test_plan.py diff --git a/blueprints/data-solutions/data-platform-foundations/README.md b/blueprints/data-solutions/data-platform-foundations/README.md index ad087216..a272a8c3 100644 --- a/blueprints/data-solutions/data-platform-foundations/README.md +++ b/blueprints/data-solutions/data-platform-foundations/README.md @@ -289,3 +289,16 @@ Features to add in future releases: - Add example on how to use Cloud Data Loss Prevention - Add solution to handle Tables, Views, and Authorized Views lifecycle - Add solution to handle Metadata lifecycle + +## Test + +```hcl +module "test" { + source = "./fabric/blueprints/data-solutions/data-platform-foundations/" + organization_domain = "example.com" + billing_account_id = "123456-123456-123456" + folder_id = "folders/12345678" + prefix = "prefix" +} +# tftest modules=43 resources=297 +``` diff --git a/tests/blueprints/data_solutions/data_platform_foundations/__init__.py b/tests/blueprints/data_solutions/data_platform_foundations/__init__.py deleted file mode 100644 index 6d6d1266..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/__init__.py +++ /dev/null @@ -1,13 +0,0 @@ -# Copyright 2022 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 -# -# http://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. diff --git a/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf b/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf deleted file mode 100644 index 5acb29e8..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/fixture/main.tf +++ /dev/null @@ -1,25 +0,0 @@ -/** - * Copyright 2022 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 - * - * http://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. - */ - -module "test" { - source = "../../../../../blueprints/data-solutions/data-platform-foundations/" - organization_domain = "example.com" - project_config = { - billing_account_id = "123456-123456-123456" - parent = "folders/12345678" - } - prefix = "prefix" -} diff --git a/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py b/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py deleted file mode 100644 index 630944f2..00000000 --- a/tests/blueprints/data_solutions/data_platform_foundations/test_plan.py +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright 2022 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 -# -# http://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 -import pytest - -FIXTURES_DIR = os.path.join(os.path.dirname(__file__), 'fixture') - - -def test_resources(e2e_plan_runner): - "Test that plan works and the numbers of resources is as expected." - modules, resources = e2e_plan_runner(FIXTURES_DIR) - - assert len(modules) == 42 - assert len(resources) == 277