Skip to content

Commit c67f245

Browse files
committed
fmc_vpn_ra test update
1 parent 6aab34a commit c67f245

File tree

3 files changed

+7
-24
lines changed

3 files changed

+7
-24
lines changed

gen/definitions/vpn_ra.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ name: VPN RA
55
rest_endpoint: /api/fmc_config/v1/domain/{DOMAIN_UUID}/policy/ravpns
66
res_description: This resource manages FTD Remote Access (RA) Virtual Private Networks (VPNs).
77
doc_category: VPN
8+
skip_minimum_test: true
89
attributes:
910
- model_name: name
1011
type: String
@@ -28,12 +29,14 @@ attributes:
2829
description: Enable SSL protocol.
2930
example: true
3031
default_value: true
32+
minimum_test_value: '"true"'
3133
- model_name: configureIpsec
3234
type: Bool
3335
tf_name: protocol_ipsec_ikev2
3436
description: Enable IPsec IKEv2 protocol.
3537
example: true
3638
default_value: true
39+
minimum_test_value: '"true"'
3740
- model_name: id
3841
data_path: [localRealmServer]
3942
type: String
@@ -78,12 +81,14 @@ attributes:
7881
tf_name: protocol_ipsec_ikev2
7982
description: Enable IPsec IKEv2.
8083
example: true
84+
minimum_test_value: '"true"'
8185
#default_value: true
8286
- model_name: enableSSL
8387
type: Bool
8488
tf_name: protocol_ssl
8589
description: Enable SSL.
8690
example: true
91+
minimum_test_value: '"true"'
8792
#default_value: true
8893
- model_name: enableDTLS
8994
type: Bool
@@ -195,6 +200,7 @@ attributes:
195200
description: Id of Secure Client Customization.
196201
type: String
197202
computed: true
203+
exclude_test: true # FMCVERSION <= 7.2
198204

199205
# Advenced - Address Assignment Policy
200206
# Configuration managed by another endpoint
@@ -245,6 +251,7 @@ attributes:
245251
type: String
246252
description: Id of Load Balancing settings.
247253
computed: true
254+
exclude_test: true # FMCVERSION <= 7.2
248255

249256
# Advanced - IPSEC - Crypto Maps
250257
# Configuration managed by another endpoint

internal/provider/data_source_fmc_vpn_ra_test.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,9 @@ func TestAccDataSourceFmcVPNRA(t *testing.T) {
4242
checks = append(checks, resource.TestCheckResourceAttr("data.fmc_vpn_ra.test", "web_access_port_number", "443"))
4343
checks = append(checks, resource.TestCheckResourceAttr("data.fmc_vpn_ra.test", "dtls_port_number", "443"))
4444
checks = append(checks, resource.TestCheckResourceAttr("data.fmc_vpn_ra.test", "bypass_access_control_policy_for_decrypted_traffic", "false"))
45-
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "secure_client_customization_id"))
4645
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "address_assignment_policy_id"))
4746
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "certificate_map_id"))
4847
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "ldap_attribute_map_id"))
49-
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "load_balancing_id"))
5048
checks = append(checks, resource.TestCheckResourceAttrSet("data.fmc_vpn_ra.test", "ipsec_ike_parameters_id"))
5149
resource.Test(t, resource.TestCase{
5250
PreCheck: func() { testAccPreCheck(t) },

internal/provider/resource_fmc_vpn_ra_test.go

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package provider
1919

2020
// Section below is generated&owned by "gen/generator.go". //template:begin imports
2121
import (
22-
"os"
2322
"testing"
2423

2524
"github.com/hashicorp/terraform-plugin-testing/helper/resource"
@@ -43,19 +42,12 @@ func TestAccFmcVPNRA(t *testing.T) {
4342
checks = append(checks, resource.TestCheckResourceAttr("fmc_vpn_ra.test", "web_access_port_number", "443"))
4443
checks = append(checks, resource.TestCheckResourceAttr("fmc_vpn_ra.test", "dtls_port_number", "443"))
4544
checks = append(checks, resource.TestCheckResourceAttr("fmc_vpn_ra.test", "bypass_access_control_policy_for_decrypted_traffic", "false"))
46-
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "secure_client_customization_id"))
4745
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "address_assignment_policy_id"))
4846
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "certificate_map_id"))
4947
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "ldap_attribute_map_id"))
50-
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "load_balancing_id"))
5148
checks = append(checks, resource.TestCheckResourceAttrSet("fmc_vpn_ra.test", "ipsec_ike_parameters_id"))
5249

5350
var steps []resource.TestStep
54-
if os.Getenv("SKIP_MINIMUM_TEST") == "" {
55-
steps = append(steps, resource.TestStep{
56-
Config: testAccFmcVPNRAPrerequisitesConfig + testAccFmcVPNRAConfig_minimum(),
57-
})
58-
}
5951
steps = append(steps, resource.TestStep{
6052
Config: testAccFmcVPNRAPrerequisitesConfig + testAccFmcVPNRAConfig_all(),
6153
Check: resource.ComposeTestCheckFunc(checks...),
@@ -389,20 +381,6 @@ locals {
389381
// End of section. //template:end testPrerequisites
390382

391383
// Section below is generated&owned by "gen/generator.go". //template:begin testAccConfigMinimal
392-
393-
func testAccFmcVPNRAConfig_minimum() string {
394-
config := `resource "fmc_vpn_ra" "test" {` + "\n"
395-
config += ` name = "my_ftd_ra_vpn"` + "\n"
396-
config += ` access_interfaces = [{` + "\n"
397-
config += ` id = fmc_security_zone.test.id` + "\n"
398-
config += ` }]` + "\n"
399-
config += ` group_policies = [{` + "\n"
400-
config += ` id = data.fmc_group_policy.test.id` + "\n"
401-
config += ` }]` + "\n"
402-
config += `}` + "\n"
403-
return config
404-
}
405-
406384
// End of section. //template:end testAccConfigMinimal
407385

408386
// Section below is generated&owned by "gen/generator.go". //template:begin testAccConfigAll

0 commit comments

Comments
 (0)