Skip to content

Commit

Permalink
add resource field test
Browse files Browse the repository at this point in the history
  • Loading branch information
Tal Mosenzon committed Jan 16, 2025
1 parent d032f93 commit d1f519c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions aquasec/data_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,14 @@ func TestDataSourceServiceComplex(t *testing.T) {
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.port_range", "22-80"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.resource_type", "anywhere"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.allow", "true"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.resource", "192.168.1.0/24"),

// Outbound Networks
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.#", "1"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.port_range", "443"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.resource_type", "anywhere"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.allow", "false"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.resource", "10.0.0.0/16"),

resource.TestCheckResourceAttr(rootRef, "priority", "1"),
resource.TestCheckResourceAttr(rootRef, "target", "container"),
Expand Down
2 changes: 2 additions & 0 deletions aquasec/resource_service_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,12 +141,14 @@ func TestResourceAquasecServiceComplexCreate(t *testing.T) {
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.port_range", "22-80"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.resource_type", "anywhere"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.allow", "true"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.inbound_networks.0.resource", "190.1.2.3/12"),

// Outbound Networks
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.#", "1"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.port_range", "443"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.resource_type", "anywhere"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.allow", "false"),
resource.TestCheckResourceAttr(rootRef, "local_policies.0.outbound_networks.0.resource", "190.1.2.3/12"),
),
},
},
Expand Down

0 comments on commit d1f519c

Please sign in to comment.