[Improvement](regression-test) generate user token by configured user and password rather than hard cord (#31345)
Co-authored-by: xy720 <22125576+xy720@users.noreply.github.com>
This commit is contained in:
@ -69,8 +69,9 @@ suite("test_bloom_filter_hit") {
|
||||
def dst = 'http://' + context.config.feHttpAddress
|
||||
def conn = new URL(dst + url).openConnection()
|
||||
conn.setRequestMethod("GET")
|
||||
//token for root
|
||||
conn.setRequestProperty("Authorization","Basic cm9vdDo=")
|
||||
def encoding = Base64.getEncoder().encodeToString((context.config.feHttpUser + ":" +
|
||||
(context.config.feHttpPassword == null ? "" : context.config.feHttpPassword)).getBytes("UTF-8"))
|
||||
conn.setRequestProperty("Authorization", "Basic ${encoding}")
|
||||
return conn.getInputStream().getText()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user