moved to new test style
This commit is contained in:
parent
21c56abc22
commit
b21c57d193
|
@ -107,3 +107,17 @@ The above command will delete the associated resources so there will be no billa
|
|||
| [zone](variables.tf#L45) | The GCP zone for the VM. | <code></code> | | <code>europe-west1-b</code> |
|
||||
|
||||
<!-- END TFDOC -->
|
||||
|
||||
|
||||
## Test
|
||||
|
||||
```hcl
|
||||
module "psc-glb-and-armor-test" {
|
||||
source = "./fabric/blueprints/networking/psc-glb-and-armor"
|
||||
prefix = "test"
|
||||
project_create = true
|
||||
consumer_project_id = "project-1"
|
||||
producer_project_id = "project-2"
|
||||
}
|
||||
# tftest modules=3 resources=31
|
||||
```
|
||||
|
|
|
@ -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.
|
|
@ -1,21 +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
|
||||
#
|
||||
# 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.
|
||||
|
||||
module "test" {
|
||||
source = "../../../../../blueprints/networking/psc-glb-and-armor"
|
||||
prefix = var.prefix
|
||||
project_create = var.project_create
|
||||
consumer_project_id = var.consumer_project_id
|
||||
producer_project_id = var.producer_project_id
|
||||
}
|
|
@ -1,33 +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
|
||||
#
|
||||
# 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.
|
||||
|
||||
variable "producer_project_id" {
|
||||
type = string
|
||||
default = "project-1"
|
||||
}
|
||||
|
||||
variable "consumer_project_id" {
|
||||
type = string
|
||||
default = "project-2"
|
||||
}
|
||||
|
||||
variable "prefix" {
|
||||
type = string
|
||||
default = "test"
|
||||
}
|
||||
|
||||
variable "project_create" {
|
||||
type = bool
|
||||
default = true
|
||||
}
|
|
@ -1,19 +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.
|
||||
|
||||
def test_resources(e2e_plan_runner):
|
||||
"Test that plan works and the numbers of resources is as expected."
|
||||
modules, resources = e2e_plan_runner()
|
||||
assert len(modules) == 2
|
||||
assert len(resources) == 7
|
Loading…
Reference in New Issue