-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconfig_property_data_source_test.go
More file actions
32 lines (29 loc) · 1.05 KB
/
config_property_data_source_test.go
File metadata and controls
32 lines (29 loc) · 1.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
package provider
import (
"testing"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)
func TestAccConfigPropertyDataSource(t *testing.T) {
resource.Test(t, resource.TestCase{
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
{
Config: providerConfig + `
data "dependencytrack_config_property" "test" {
group = "general"
name = "base.url"
}
`,
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.dependencytrack_config_property.test", "group", "general"),
resource.TestCheckResourceAttr("data.dependencytrack_config_property.test", "name", "base.url"),
resource.TestCheckResourceAttr("data.dependencytrack_config_property.test", "value", ""),
resource.TestCheckResourceAttr("data.dependencytrack_config_property.test", "type", "URL"),
resource.TestCheckResourceAttr("data.dependencytrack_config_property.test", "description",
"URL used to construct links back to Dependency-Track from external systems",
),
),
},
},
})
}