File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ import (
14
14
func TestExamples (t * testing.T ) {
15
15
t .Parallel ()
16
16
17
+ // Resource examples
17
18
for _ , testDir := range []string {
18
19
"coder_workspace_tags" ,
19
20
} {
@@ -32,6 +33,26 @@ func TestExamples(t *testing.T) {
32
33
})
33
34
})
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
+ }
35
56
}
36
57
37
58
func mustReadFile (t * testing.T , path string ) string {
You can’t perform that action at this time.
0 commit comments