Skip to content

Commit 7f94026

Browse files
committed
Fix tag test tags
1 parent a8febde commit 7f94026

File tree

3 files changed

+11
-2
lines changed

3 files changed

+11
-2
lines changed

gen/definitions/generic/tag.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ rest_endpoint: /v1/tags
44
minimum_version: 20.12.0
55
id_attribute: id
66
doc_category: Inventory
7+
test_tags: [SDWAN_2012]
78
attributes:
89
- model_name: name
910
mandatory: true
@@ -23,5 +24,5 @@ attributes:
2324
type: Set
2425
element_type: String
2526
description: List of associated devices
26-
example: C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B
27-
test_value: '["C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B"]'
27+
example: C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B
28+
test_value: '["C8K-40C0CCFD-9EA8-2B2E-E73B-32C5924EC79B"]'

internal/provider/data_source_sdwan_tag_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package provider
1919

2020
// Section below is generated&owned by "gen/generator.go". //template:begin imports
2121
import (
22+
"os"
2223
"testing"
2324

2425
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
@@ -27,6 +28,9 @@ import (
2728
// End of section. //template:end imports
2829

2930
func TestAccDataSourceSdwanTag(t *testing.T) {
31+
if os.Getenv("SDWAN_2012") == "" {
32+
t.Skip("skipping test, set environment variable SDWAN_2012")
33+
}
3034
var checks []resource.TestCheckFunc
3135
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_tag.test", "name", "TAG_1"))
3236
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_tag.test", "description", "My tag"))

internal/provider/resource_sdwan_tag_test.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ package provider
1919

2020
// Section below is generated&owned by "gen/generator.go". //template:begin imports
2121
import (
22+
"os"
2223
"testing"
2324

2425
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
@@ -27,6 +28,9 @@ import (
2728
// End of section. //template:end imports
2829

2930
func TestAccSdwanTag(t *testing.T) {
31+
if os.Getenv("SDWAN_2012") == "" {
32+
t.Skip("skipping test, set environment variable SDWAN_2012")
33+
}
3034
var checks []resource.TestCheckFunc
3135
checks = append(checks, resource.TestCheckResourceAttr("sdwan_tag.test", "name", "TAG_1"))
3236
checks = append(checks, resource.TestCheckResourceAttr("sdwan_tag.test", "description", "My tag"))

0 commit comments

Comments
 (0)