fix tests

This commit is contained in:
Lorenzo Caggioni 2022-01-14 18:39:22 +01:00
parent 87426786ce
commit 33ce60cf00
4 changed files with 26 additions and 19 deletions

View File

@ -1,4 +1,4 @@
# Copyright 2021 Google LLC
# 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.

View File

@ -1,5 +1,5 @@
/**
* Copyright 2021 Google LLC
* 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.
@ -15,8 +15,8 @@
*/
module "test" {
source = "../../../../data-solutions/gcs-to-bq-with-least-privileges/"
billing_account = var.billing_account
root_node = var.root_node
project_name = var.project_name
source = "../../../../../examples/data-solutions/gcs-to-bq-with-least-privileges/"
project_create = var.project_create
project_id = var.project_id
prefix = var.prefix
}

View File

@ -1,5 +1,5 @@
/**
* Copyright 2021 Google LLC
* 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.
@ -14,19 +14,26 @@
* limitations under the License.
*/
variable "billing_account" {
type = string
default = "123456-123456-123456"
variable "prefix" {
description = "Unique prefix used for resource names. Not used for project if 'project_create' is null."
type = string
default = "prefix"
}
variable "project_name" {
description = "The project name."
type = string
default = "gcs2bq-least-privileges"
variable "project_create" {
description = "Provide values if project creation is needed, uses existing project if null. Parent is in 'folders/nnn' or 'organizations/nnn' format"
type = object({
billing_account_id = string
parent = string
})
default = {
billing_account_id = "123456-123456-123456"
parent = "folders/12345678"
}
}
variable "root_node" {
description = "The resource name of the parent Folder or Organization. Must be of the form folders/folder_id or organizations/org_id."
variable "project_id" {
description = "Project id, references existing project if `project_create` is null."
type = string
default = "folders/12345678"
default = "datalake"
}

View File

@ -1,4 +1,4 @@
# Copyright 2021 Google LLC
# 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.
@ -24,4 +24,4 @@ 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) == 11
assert len(resources) == 49
assert len(resources) == 43