added use cases

This commit is contained in:
Elbaz 2023-08-28 16:02:16 +03:00
parent aea45de290
commit 5c9a332ad6
5 changed files with 12 additions and 4 deletions

View File

@ -132,7 +132,7 @@ func TestTest(t *testing.T) {
expected: "1 passed, 0 failed.",
code: 0,
},
"broken_no_hcl": {
"broken_no_valid_hcl": {
expected: "Unsupported block type",
code: 1,
},
@ -187,11 +187,14 @@ func TestTest_Broken_HCL_Files(t *testing.T) {
code int
skip bool
}{
"broken_no_hcl": {
"broken_no_valid_hcl": {
expected: "Unsupported block type",
code: 1,
},
"broken_wrong_block_resource": {
expected: "Blocks of type \"resource\" are not expected here.",
code: 1,
},
}
for name, tc := range tcs {
t.Run(name, func(t *testing.T) {

View File

@ -1,3 +1,2 @@
resource "test_resource" "resource" {
value = var.input
}

View File

@ -0,0 +1,2 @@
resource "test_resource" "resource" {
}

View File

@ -0,0 +1,4 @@
resource "test_resource" "i_cant_write_that_here" {
}
run "test" {}