File tree Expand file tree Collapse file tree 2 files changed +7
-1
lines changed
Expand file tree Collapse file tree 2 files changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -143,6 +143,12 @@ def test_vpn_conn_tunnel_options_specification(self):
143143 PreSharedKey = "0SAD_FEA_SDF" , TunnelInsideCidr = "192.168.16.0/30"
144144 )
145145
146+ def test_vpn_port_validator (self ):
147+ for port in (443 , 1194 ):
148+ vec2 .validate_clientvpnendpoint_vpnport (port )
149+ with self .assertRaises (ValueError ):
150+ vec2 .validate_clientvpnendpoint_vpnport (22 )
151+
146152 def test_validate_placement_strategy (self ):
147153 for s in ("cluster" , "spread" , "partition" ):
148154 vec2 .validate_placement_strategy (s )
Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ def validate_clientvpnendpoint_vpnport(vpnport):
188188 if vpnport not in VALID_CLIENTVPNENDPOINT_VPNPORT :
189189 raise ValueError (
190190 "ClientVpnEndpoint VpnPort must be one of: %s"
191- % ", " .join (VALID_CLIENTVPNENDPOINT_VPNPORT )
191+ % ", " .join (map ( str , VALID_CLIENTVPNENDPOINT_VPNPORT ) )
192192 )
193193 return vpnport
194194
You can’t perform that action at this time.
0 commit comments