Skip to content

Commit

Permalink
added testing the default field
Browse files Browse the repository at this point in the history
  • Loading branch information
jenxie committed Oct 14, 2024
1 parent 0369394 commit de21267
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions netbox/resource_netbox_custom_field_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,15 @@ resource "netbox_custom_field" "test" {
type = "text"
content_types = ["virtualization.vminterface"]
weight = 100
default = "red"
validation_regex = "^.*$"
}`, testName),
Check: resource.ComposeTestCheckFunc(
resource.TestCheckResourceAttr("netbox_custom_field.test", "name", testName),
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", "^.*$"),
),
},
Expand Down

0 comments on commit de21267

Please sign in to comment.