From 0c73489e7a7ed23cfd4ae9fdda678ca8c4bb0a11 Mon Sep 17 00:00:00 2001 From: soulbird Date: Mon, 16 May 2022 14:24:27 +0800 Subject: [PATCH] ci(traffic-split): improve ci stability (#7055) Co-authored-by: soulbird --- t/plugin/traffic-split.t | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/t/plugin/traffic-split.t b/t/plugin/traffic-split.t index ea11f85e..7f1afd5d 100644 --- a/t/plugin/traffic-split.t +++ b/t/plugin/traffic-split.t @@ -696,7 +696,7 @@ GET /t local json = require("toolkit.json") local t = require("lib.test_admin").test local data = { - uri = "/server_port", + uri = "/", plugins = { ["traffic-split"] = { rules = { { @@ -704,8 +704,10 @@ GET /t upstream = { name = "upstream_A", type = "roundrobin", + pass_host = "rewrite", + upstream_host = "www.apiseven.com", nodes = { - ["apiseven.com:80"] = 0 + ["www.apiseven.com:80"] = 0 } }, weight = 100000 @@ -743,10 +745,10 @@ passed === TEST 19: domain name resolved successfully --- request -GET /server_port ---- error_code: 502 +GET / +--- error_code: 200 --- error_log eval -qr/dns resolver domain: apiseven.com to \d+.\d+.\d+.\d+/ +qr/dns resolver domain: www.apiseven.com to \d+.\d+.\d+.\d+/