We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e843f4 commit e1a4937Copy full SHA for e1a4937
postgresql/resource_postgresql_script_test.go
@@ -155,3 +155,28 @@ func TestAccPostgresqlScript_fail(t *testing.T) {
155
},
156
})
157
}
158
+
159
+func TestAccPostgresqlScript_failMultiple(t *testing.T) {
160
+ config := `
161
+ resource "postgresql_script" "invalid" {
162
+ commands = [
163
+ "BEGIN",
164
+ "SLC FROM nowhere;",
165
+ "COMMIT"
166
+ ]
167
+ tries = 2
168
+ timeout = 2
169
+ }
170
+ `
171
172
+ resource.Test(t, resource.TestCase{
173
+ PreCheck: func() { testAccPreCheck(t) },
174
+ Providers: testAccProviders,
175
+ Steps: []resource.TestStep{
176
+ {
177
+ Config: config,
178
+ ExpectError: regexp.MustCompile("syntax error"),
179
+ },
180
181
+ })
182
+}
0 commit comments