From c468cede8bd1a691bc19270b558ffffa5c9582f9 Mon Sep 17 00:00:00 2001 From: Zherphy <1123678689@qq.com> Date: Thu, 12 Dec 2024 11:18:58 +0800 Subject: [PATCH] edit: edit server_test.go MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 修改因代码检查出现的问题 --- server/server_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/server_test.go b/server/server_test.go index ea119bd..298f9ce 100644 --- a/server/server_test.go +++ b/server/server_test.go @@ -268,7 +268,7 @@ func Test_server_dealWithAuthError(t *testing.T) { validatecfg.passwordRegexp, _ = regexp.Compile(`^[a-zA-Z0-9!@_#$%^&*()-=+,?.,]*$`) validatecfg.usernameRegexp, _ = regexp.Compile(`^[a-zA-Z]([-_.]?[a-zA-Z0-9]+)*$`) username := "user" - password := "wrong_pwd" + password := "" authString := fmt.Sprintf("%s:%s", username, password) encodedAuth := base64.StdEncoding.EncodeToString([]byte(authString)) req := httptest.NewRequest(http.MethodGet, batchUrlPath, nil)