Skip to content

Commit 3478db7

Browse files
committed
add string vsn
1 parent 935539e commit 3478db7

File tree

4 files changed

+4
-3
lines changed

4 files changed

+4
-3
lines changed

internal/addrs/resource.go

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@ func (r Resource) String() string {
2929
return fmt.Sprintf("data.%s.%s", r.Type, r.Name)
3030
case EphemeralResourceMode:
3131
return fmt.Sprintf("ephemeral.%s.%s", r.Type, r.Name)
32+
case ListResourceMode:
33+
return fmt.Sprintf("list.%s.%s", r.Type, r.Name)
3234
default:
3335
// Should never happen, but we'll return a string here rather than
3436
// crashing just in case it does.

internal/configs/query_file.go

-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ func decodeQueryListBlock(block *hcl.Block) (*Resource, hcl.Diagnostics) {
107107

108108
if attr, exists := content.Attributes["provider"]; exists {
109109
var providerDiags hcl.Diagnostics
110-
// TODO: Support provider.test instead of just test
111110
r.ProviderConfigRef, providerDiags = decodeProviderConfigRef(attr.Expr, "provider")
112111
diags = append(diags, providerDiags...)
113112
} else {

internal/initwd/testing.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func LoadConfigForTests(t *testing.T, rootDir string, testsDir string) (*configs
5353
t.Fatalf("failed to refresh modules after installation: %s", err)
5454
}
5555

56-
config, hclDiags := loader.LoadConfig(rootDir)
56+
config, hclDiags := loader.LoadConfig(rootDir, configs.MatchTestFiles(testsDir), configs.MatchQueryFiles())
5757
diags = diags.Append(hclDiags)
5858
return config, loader, cleanup, diags
5959
}

internal/terraform/terraform_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ func testModuleInline(t testing.TB, sources map[string]string) *configs.Config {
139139
t.Fatalf("failed to refresh modules after installation: %s", err)
140140
}
141141

142-
config, diags := loader.LoadConfigWithTests(cfgPath, "tests")
142+
config, diags := loader.LoadConfig(cfgPath, configs.MatchTestFiles("tests"), configs.MatchQueryFiles())
143143
if diags.HasErrors() {
144144
t.Fatal(diags.Error())
145145
}

0 commit comments

Comments
 (0)