@@ -302,6 +302,59 @@ func TestAccTencentCloudGaapLayer4Listener_udpHealthCheck(t *testing.T) {
302
302
})
303
303
}
304
304
305
+ func TestAccTencentCloudGaapLayer4Listener_udpHealthCheck (t * testing.T ) {
306
+ t .Parallel ()
307
+ id := new (string )
308
+
309
+ resource .Test (t , resource.TestCase {
310
+ PreCheck : func () { tcacctest .AccPreCheckCommon (t , tcacctest .ACCOUNT_TYPE_PREPAY ) },
311
+ Providers : tcacctest .AccProviders ,
312
+ CheckDestroy : testAccCheckGaapLayer4ListenerDestroy (id , "UDP" ),
313
+ Steps : []resource.TestStep {
314
+ {
315
+ Config : testAccGaapLayer4ListenerUdpHealthCheckUpdatePing ,
316
+ Check : resource .ComposeTestCheckFunc (
317
+ testAccCheckGaapLayer4ListenerExists ("tencentcloud_gaap_layer4_listener.foo" , id , "UDP" ),
318
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "protocol" , "UDP" ),
319
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "name" , "layer4-udp-listener-hc" ),
320
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "port" , "9093" ),
321
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "scheduler" , "rr" ),
322
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "realserver_type" , "IP" ),
323
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "proxy_id" ),
324
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "health_check" , "true" ),
325
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "realserver_bind_set.#" , "2" ),
326
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "status" ),
327
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "create_time" ),
328
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "proxy_id" ),
329
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "check_type" , "PING" ),
330
+ ),
331
+ },
332
+ {
333
+ Config : testAccGaapLayer4ListenerUdpHealthCheckUpdatePort ,
334
+ Check : resource .ComposeTestCheckFunc (
335
+ testAccCheckGaapLayer4ListenerExists ("tencentcloud_gaap_layer4_listener.foo" , id , "UDP" ),
336
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "protocol" , "UDP" ),
337
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "name" , "layer4-udp-listener-hc" ),
338
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "port" , "9093" ),
339
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "scheduler" , "rr" ),
340
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "realserver_type" , "IP" ),
341
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "proxy_id" ),
342
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "health_check" , "true" ),
343
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "realserver_bind_set.#" , "2" ),
344
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "status" ),
345
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "create_time" ),
346
+ resource .TestCheckResourceAttrSet ("tencentcloud_gaap_layer4_listener.foo" , "proxy_id" ),
347
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "check_type" , "PORT" ),
348
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "check_port" , "6666" ),
349
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "context_type" , "TEXT" ),
350
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "send_context" , "111" ),
351
+ resource .TestCheckResourceAttr ("tencentcloud_gaap_layer4_listener.foo" , "recv_context" , "222" ),
352
+ ),
353
+ },
354
+ },
355
+ })
356
+ }
357
+
305
358
func TestAccTencentCloudGaapLayer4Listener_udpDomain (t * testing.T ) {
306
359
t .Parallel ()
307
360
id := new (string )
0 commit comments