INNER CODE UNIT · Go
TestDataSource_Program_PathAndEmptyString
hashicorp/terraform-provider-external · internal/provider/data_source_test.go:143
func TestDataSource_Program_PathAndEmptyString(t *testing.T) {
programPath, err := buildDataSourceTestProgram()
if err != nil {
t.Fatal(err)
return
}
resource.UnitTest(t, resource.TestCase{
ProtoV5ProviderFactories: protoV5ProviderFactories(),
Steps: []resource.TestStep{
{
Config: fmt.Sprintf(`
data "external" "test" {
program = [
%[1]q,
"", # e.g. a variable that became empty
]