terraform-provider-dokploy/internal/provider/example_data_source_test.go
Austin Valle 9b24243a86
[COMPLIANCE] Add copyright and license headers (#146)
* add copywrite config

* add note to copywrite HCL file

* [COMPLIANCE] Add copyright and license headers

* Update .copywrite.hcl

Co-authored-by: Brian Flad <bflad417@gmail.com>

* Update .copywrite.hcl

Co-authored-by: Brian Flad <bflad417@gmail.com>

* Update .copywrite.hcl

Co-authored-by: Brian Flad <bflad417@gmail.com>

---------

Co-authored-by: Brian Flad <bflad417@gmail.com>
2023-06-05 14:11:07 -04:00

33 lines
762 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: MPL-2.0
package provider
import (
"testing"
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
)
func TestAccExampleDataSource(t *testing.T) {
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Steps: []resource.TestStep{
// Read testing
{
Config: testAccExampleDataSourceConfig,
Check: resource.ComposeAggregateTestCheckFunc(
resource.TestCheckResourceAttr("data.scaffolding_example.test", "id", "example-id"),
),
},
},
})
}
const testAccExampleDataSourceConfig = `
data "scaffolding_example" "test" {
configurable_attribute = "example"
}
`