Skip to content

Commit

Permalink
Remove redundant test_values
Browse files Browse the repository at this point in the history
  • Loading branch information
seconroy committed Sep 30, 2024
1 parent 5b60720 commit 45e2e04
Show file tree
Hide file tree
Showing 24 changed files with 59 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,4 @@ attributes:
type: String
description: Expanded community value, e.g. `100:1000`
example: 100:1000
test_value: '"100:1000"'
minimum_test_value: '"100:1000"'
2 changes: 0 additions & 2 deletions gen/definitions/profile_parcels/other_ucse.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,10 @@ attributes:
tf_name: ipv4_address
data_path: [imc, ip]
example: 2.2.2.2/24
test_value: '"2.2.2.2/24"'
minimum_test_value: '"2.2.2.2/24"'
- model_name: defaultGateway
data_path: [imc, ip]
example: 2.2.2.2
test_value: '"2.2.2.2"'
minimum_test_value: '"2.2.2.2"'
- model_name: vlanId
data_path: [imc, vlan]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ attributes:
tf_name: interface_name
data_path: [basic]
example: gre1
test_value: '"gre1"'
minimum_test_value: '"gre1"'
- model_name: description
tf_name: interface_description
Expand All @@ -32,13 +31,11 @@ attributes:
tf_name: ipv4_address
data_path: [basic, address]
example: 70.1.1.1
test_value: '"70.1.1.1"'
minimum_test_value: '"70.1.1.1"'
- model_name: mask
tf_name: ipv4_subnet_mask
data_path: [basic, address]
example: 255.255.255.0
test_value: '"255.255.255.0"'
minimum_test_value: '"255.255.255.0"'
- model_name: shutdown
data_path: [basic]
Expand Down Expand Up @@ -66,7 +63,6 @@ attributes:
tf_name: tunnel_destination_ipv4_address
data_path: [basic]
example: 79.1.1.1
test_value: '"79.1.1.1"'
minimum_test_value: '"79.1.1.1"'
- model_name: mtu
tf_name: ip_mtu
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ attributes:
- model_name: ifName
tf_name: interface_name
example: ipsec987
test_value: '"ipsec987"'
minimum_test_value: '"ipsec987"'
- model_name: shutdown
example: true
Expand All @@ -32,36 +31,30 @@ attributes:
tf_name: ipv4_address
data_path: [address]
example: 9.7.5.4
test_value: '"9.7.5.4"'
minimum_test_value: '"9.7.5.4"'
- model_name: mask
tf_name: ipv4_subnet_mask
data_path: [address]
example: 255.255.255.0
test_value: '"255.255.255.0"'
minimum_test_value: '"255.255.255.0"'
- model_name: address
tf_name: tunnel_source_ipv4_address
data_path: [tunnelSource]
example: 1.3.5.88
test_value: '"1.3.5.88"'
minimum_test_value: '"1.3.5.88"'
- model_name: mask
tf_name: tunnel_source_ipv4_subnet_mask
data_path: [tunnelSource]
example: 255.255.255.0
test_value: '"255.255.255.0"'
example: 255.255.255.0
minimum_test_value: '"255.255.255.0"'
- model_name: tunnelSourceInterface
tf_name: tunnel_source_interface
example: GigabitEthernet8
test_value: '"GigabitEthernet8"'
minimum_test_value: '"GigabitEthernet8"'
- model_name: address
tf_name: tunnel_destination_ipv4_address
data_path: [tunnelDestination]
example: 2.55.67.99
test_value: '"2.55.67.99"'
minimum_test_value: '"2.55.67.99"'
- model_name: mask
tf_name: tunnel_destination_ipv4_subnet_mask
Expand All @@ -71,7 +64,6 @@ attributes:
- model_name: application
tf_name: application_tunnel_type
example: none
test_value: '"none"'
minimum_test_value: '"none"'
- model_name: tcpMssAdjust
tf_name: tcp_mss
Expand All @@ -88,7 +80,6 @@ attributes:
- model_name: preSharedSecret
tf_name: ike_preshared_key
example: 123
test_value: '"123"'
minimum_test_value: '"123"'
- model_name: ikeVersion
example: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ attributes:
example: false
- model_name: interfaceName
example: Vlan1
test_value: '"Vlan1"'
minimum_test_value: '"Vlan1"'
- model_name: description
tf_name: interface_description
Expand All @@ -37,13 +36,11 @@ attributes:
tf_name: ipv4_address
data_path: [ipv4, addressV4]
example: 1.2.3.4
test_value: '"1.2.3.4"'
minimum_test_value: '"1.2.3.4"'
- model_name: subnetMask
data_path: [ipv4, addressV4]
tf_name: ipv4_subnet_mask
example: 0.0.0.0
test_value: '"0.0.0.0"'
minimum_test_value: '"0.0.0.0"'
- model_name: secondaryAddressV4
tf_name: ipv4_secondary_addresses
Expand Down
4 changes: 0 additions & 4 deletions gen/definitions/profile_parcels/service_routing_eigrp.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ attributes:
- model_name: asNum
tf_name: autonomous_system_id
example: 111
test_value: '"111"'
minimum_test_value: '"111"'
- model_name: redistribute
tf_name: redistributes
Expand Down Expand Up @@ -45,17 +44,14 @@ attributes:
example: 255.255.255.0
- model_name: helloInterval
example: 5
test_value: '5'
minimum_test_value: '5'
- model_name: holdTime
example: 15
test_value: '15'
minimum_test_value: '15'
- model_name: type
tf_name: authentication_type
data_path: [authentication]
example: md5
test_value: '"md5"'
minimum_test_value: '"md5"'
- model_name: authKey
tf_name: hmac_authentication_key
Expand Down
3 changes: 0 additions & 3 deletions gen/definitions/profile_parcels/service_wireless_lan.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,12 @@ attributes:
example: silver
- model_name: country
example: GB
test_value: '"GB"'
minimum_test_value: '"GB"'
- model_name: username
example: user1
test_value: '"user1"'
minimum_test_value: '"user1"'
- model_name: password
example: Test@316s13
test_value: '"Test@316s13"'
minimum_test_value: '"Test@316s13"'
- model_name: meDynamicIpEnabled
data_path: [meIpConfig]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ attributes:
example: t1
- model_name: slot
example: 11
test_value: '11'
minimum_test_value: '11'
- model_name: controllerTxExList
tf_name: entries
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
func TestAccDataSourceSdwanExpandedCommunityListPolicyObject(t *testing.T) {
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_expanded_community_list_policy_object.test", "name", "Example"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_expanded_community_list_policy_object.test", "entries.0.community", "100:1000"))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func TestAccDataSourceSdwanOtherUCSEProfileParcel(t *testing.T) {
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "access_port_dedicated", "false"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "access_port_shared_type", "ge1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "access_port_shared_failover_type", "ge2"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "ipv4_address", "2.2.2.2/24"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "default_gateway", "2.2.2.2"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "vlan_id", "3"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "assign_priority", "3"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_other_ucse_feature.test", "interfaces.0.interface_name", "ucse2/0"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ func TestAccDataSourceSdwanServiceLANVPNInterfaceGREProfileParcel(t *testing.T)
t.Skip("skipping test, set environment variable SDWAN_2012")
}
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "interface_name", "gre1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "interface_description", "gre1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "ipv4_address", "70.1.1.1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "ipv4_subnet_mask", "255.255.255.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "shutdown", "true"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "tunnel_source_ipv4_address", "78.1.1.1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "tunnel_destination_ipv4_address", "79.1.1.1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "ip_mtu", "1500"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "tcp_mss", "1460"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_gre_feature.test", "clear_dont_fragment", "false"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,23 @@ func TestAccDataSourceSdwanServiceLANVPNInterfaceIPSecProfileParcel(t *testing.T
t.Skip("skipping test, set environment variable SDWAN_2012")
}
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "interface_name", "ipsec987"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "shutdown", "true"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "interface_description", "ipsec987"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ipv4_address", "9.7.5.4"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ipv4_subnet_mask", "255.255.255.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tunnel_source_ipv4_address", "1.3.5.88"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tunnel_source_ipv4_subnet_mask", "255.255.255.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tunnel_source_interface", "GigabitEthernet8"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tunnel_destination_ipv4_address", "2.55.67.99"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tunnel_destination_ipv4_subnet_mask", "255.255.255.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "application_tunnel_type", "none"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "tcp_mss", "1460"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "clear_dont_fragment", "false"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ip_mtu", "1500"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "dpd_interval", "10"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "dpd_retries", "3"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ike_preshared_key", "123"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ike_version", "1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ike_integrity_protocol", "main"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_ipsec_feature.test", "ike_rekey_interval", "14400"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,12 @@ func TestAccDataSourceSdwanServiceLANVPNInterfaceSVIProfileParcel(t *testing.T)
}
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "shutdown", "false"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "interface_name", "Vlan1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "interface_description", "SVI"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "interface_mtu", "1500"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ip_mtu", "1500"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ipv4_address", "1.2.3.4"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ipv4_subnet_mask", "0.0.0.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ipv4_secondary_addresses.0.address", "2.3.4.5"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ipv4_secondary_addresses.0.ipv4_subnet_mask", "0.0.0.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_lan_vpn_interface_svi_feature.test", "ipv6_address", "2001:0:0:1::0/32"))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,12 @@ func TestAccDataSourceSdwanServiceRoutingEIGRPProfileParcel(t *testing.T) {
t.Skip("skipping test, set environment variable SDWAN_2012")
}
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "autonomous_system_id", "111"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "networks.0.ip_address", "100.2.2.3"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "networks.0.mask", "255.255.255.0"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "hello_interval", "5"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "hold_time", "15"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "authentication_type", "md5"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "md5_keys.0.key_id", "2"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "interfaces.0.name", "GigabitEthernet3"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_routing_eigrp_feature.test", "interfaces.0.shutdown", "false"))
Expand Down Expand Up @@ -72,7 +76,7 @@ func testAccDataSourceSdwanServiceRoutingEIGRPProfileParcelConfig() string {
config += ` name = "TF_TEST"` + "\n"
config += ` description = "Terraform integration test"` + "\n"
config += ` feature_profile_id = sdwan_service_feature_profile.test.id` + "\n"
config += ` autonomous_system_id = "111"` + "\n"
config += ` autonomous_system_id = 111` + "\n"
config += ` networks = [{` + "\n"
config += ` ip_address = "100.2.2.3"` + "\n"
config += ` mask = "255.255.255.0"` + "\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ func TestAccDataSourceSdwanServiceWirelessLANProfileParcel(t *testing.T) {
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "ssids.0.security_type", "personal"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "ssids.0.passphrase", "MyPassword123"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "ssids.0.qos_profile", "silver"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "country", "GB"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "username", "user1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "password", "Test@316s13"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_service_wireless_lan_feature.test", "me_dynamic_ip_enabled", "true"))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ func TestAccDataSourceSdwanTransportT1E1ControllerProfileParcel(t *testing.T) {
}
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_transport_t1_e1_controller_feature.test", "type", "t1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_transport_t1_e1_controller_feature.test", "slot", "11"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_transport_t1_e1_controller_feature.test", "entries.0.t1_description", "T1"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_transport_t1_e1_controller_feature.test", "entries.0.t1_framing", "esf"))
checks = append(checks, resource.TestCheckResourceAttr("data.sdwan_transport_t1_e1_controller_feature.test", "entries.0.t1_linecode", "ami"))
Expand Down Expand Up @@ -75,7 +76,7 @@ func testAccDataSourceSdwanTransportT1E1ControllerProfileParcelConfig() string {
config += ` description = "Terraform integration test"` + "\n"
config += ` feature_profile_id = sdwan_transport_feature_profile.test.id` + "\n"
config += ` type = "t1"` + "\n"
config += ` slot = 11` + "\n"
config += ` slot = "11"` + "\n"
config += ` entries = [{` + "\n"
config += ` t1_description = "T1"` + "\n"
config += ` t1_framing = "esf"` + "\n"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ import (
func TestAccSdwanExpandedCommunityListPolicyObject(t *testing.T) {
var checks []resource.TestCheckFunc
checks = append(checks, resource.TestCheckResourceAttr("sdwan_expanded_community_list_policy_object.test", "name", "Example"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_expanded_community_list_policy_object.test", "entries.0.community", "100:1000"))
resource.Test(t, resource.TestCase{
PreCheck: func() { testAccPreCheck(t) },
ProtoV6ProviderFactories: testAccProtoV6ProviderFactories,
Expand Down
2 changes: 2 additions & 0 deletions internal/provider/resource_sdwan_other_ucse_feature_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ func TestAccSdwanOtherUCSEProfileParcel(t *testing.T) {
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "access_port_dedicated", "false"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "access_port_shared_type", "ge1"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "access_port_shared_failover_type", "ge2"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "ipv4_address", "2.2.2.2/24"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "default_gateway", "2.2.2.2"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "vlan_id", "3"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "assign_priority", "3"))
checks = append(checks, resource.TestCheckResourceAttr("sdwan_other_ucse_feature.test", "interfaces.0.interface_name", "ucse2/0"))
Expand Down
Loading

0 comments on commit 45e2e04

Please sign in to comment.