From f9618b8896a73c9316634be76b115bf2c73e0c00 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Dachary?= Date: Sat, 1 Jul 2023 01:20:44 +0200 Subject: [PATCH] [TESTS] MockVariable temporarily replaces a global value defer test.MockVariable(&variable, 1234)() (cherry picked from commit 9c78752444c2411f20e72b96b7b4fdf5359099d5) (cherry picked from commit 8ab559df0d57a17a0ea73bd3676f40a523a15ab6) (cherry picked from commit 2e7fe1ec9566e4840992e4049d8349873b7334ee) --- modules/test/utils.go | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/modules/test/utils.go b/modules/test/utils.go index 282895eaa9..23107ed00d 100644 --- a/modules/test/utils.go +++ b/modules/test/utils.go @@ -16,3 +16,11 @@ func RedirectURL(resp http.ResponseWriter) string { func IsNormalPageCompleted(s string) bool { return strings.Contains(s, `