From de2126714354db517fa54236c4f7633e05a40552 Mon Sep 17 00:00:00 2001 From: jenxie <32846807+jenxie@users.noreply.github.com> Date: Mon, 14 Oct 2024 14:05:38 +0200 Subject: [PATCH] added testing the default field --- netbox/resource_netbox_custom_field_test.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/netbox/resource_netbox_custom_field_test.go b/netbox/resource_netbox_custom_field_test.go index e71c2d3c..3ea498c5 100644 --- a/netbox/resource_netbox_custom_field_test.go +++ b/netbox/resource_netbox_custom_field_test.go @@ -22,6 +22,7 @@ resource "netbox_custom_field" "test" { type = "text" content_types = ["virtualization.vminterface"] weight = 100 + default = "red" validation_regex = "^.*$" }`, testName), Check: resource.ComposeTestCheckFunc( @@ -29,6 +30,7 @@ resource "netbox_custom_field" "test" { resource.TestCheckResourceAttr("netbox_custom_field.test", "type", "text"), resource.TestCheckTypeSetElemAttr("netbox_custom_field.test", "content_types.*", "virtualization.vminterface"), resource.TestCheckResourceAttr("netbox_custom_field.test", "weight", "100"), + resource.TestCheckResourceAttr("netbox_custom_field.test", "default", "red"), resource.TestCheckResourceAttr("netbox_custom_field.test", "validation_regex", "^.*$"), ), },