File tree Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Expand file tree Collapse file tree 1 file changed +27
-0
lines changed Original file line number Diff line number Diff line change @@ -299,6 +299,33 @@ func TestAgent_ResourcesMonitoring(t *testing.T) {
299299 }},
300300 })
301301 })
302+ t .Run ("MultipleMemory" , func (t * testing.T ) {
303+ resource .Test (t , resource.TestCase {
304+ ProviderFactories : coderFactory (),
305+ IsUnitTest : true ,
306+ Steps : []resource.TestStep {{
307+ Config : `
308+ provider "coder" {
309+ url = "https://example.com"
310+ }
311+ resource "coder_agent" "dev" {
312+ os = "linux"
313+ arch = "amd64"
314+ resources_monitoring {
315+ memory {
316+ enabled = true
317+ threshold = 80
318+ }
319+ memory {
320+ enabled = true
321+ threshold = 90
322+ }
323+ }
324+ }` ,
325+ ExpectError : regexp .MustCompile (`No more than 1 "memory" blocks are allowed` ),
326+ }},
327+ })
328+ })
302329
303330 t .Run ("InvalidThreshold" , func (t * testing.T ) {
304331 resource .Test (t , resource.TestCase {
You can’t perform that action at this time.
0 commit comments