We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0c57de0 commit 3a98b58Copy full SHA for 3a98b58
provider/examples_test.go
@@ -14,6 +14,7 @@ import (
14
func TestExamples(t *testing.T) {
15
t.Parallel()
16
17
+ // Resource examples
18
for _, testDir := range []string{
19
"coder_workspace_tags",
20
} {
@@ -32,6 +33,26 @@ func TestExamples(t *testing.T) {
32
33
})
34
35
}
36
+
37
+ // Data source examples
38
+ for _, testDir := range []string{
39
+ "coder_parameter",
40
+ } {
41
+ t.Run(testDir, func(t *testing.T) {
42
+ testDir := testDir
43
+ t.Parallel()
44
45
+ resource.Test(t, resource.TestCase{
46
+ Providers: map[string]*schema.Provider{
47
+ "coder": provider.New(),
48
+ },
49
+ IsUnitTest: true,
50
+ Steps: []resource.TestStep{{
51
+ Config: mustReadFile(t, "../examples/data-sources/"+testDir+"/data-source.tf"),
52
+ }},
53
+ })
54
55
+ }
56
57
58
func mustReadFile(t *testing.T, path string) string {
0 commit comments