From 4e2152db97d80126d56d602b0f25bb44d2ea1680 Mon Sep 17 00:00:00 2001 From: yusing Date: Thu, 6 Feb 2025 18:14:07 +0800 Subject: [PATCH] fix test --- internal/route/rules/on_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/route/rules/on_test.go b/internal/route/rules/on_test.go index fb7af45..a27fa1a 100644 --- a/internal/route/rules/on_test.go +++ b/internal/route/rules/on_test.go @@ -212,7 +212,7 @@ func TestOnCorrectness(t *testing.T) { }, { name: "basic_auth_correct", - checker: "basic_auth user " + string(E.Must(bcrypt.GenerateFromPassword([]byte("password"), bcrypt.DefaultCost))), + checker: "basic_auth user " + string(Must(bcrypt.GenerateFromPassword([]byte("password"), bcrypt.DefaultCost))), input: &http.Request{ Header: http.Header{ "Authorization": {"Basic " + base64.StdEncoding.EncodeToString([]byte("user:password"))}, // "user:password" @@ -222,7 +222,7 @@ func TestOnCorrectness(t *testing.T) { }, { name: "basic_auth_incorrect", - checker: "basic_auth user " + string(E.Must(bcrypt.GenerateFromPassword([]byte("password"), bcrypt.DefaultCost))), + checker: "basic_auth user " + string(Must(bcrypt.GenerateFromPassword([]byte("password"), bcrypt.DefaultCost))), input: &http.Request{ Header: http.Header{ "Authorization": {"Basic " + base64.StdEncoding.EncodeToString([]byte("user:incorrect"))}, // "user:wrong"