Переключатель теста «боевой ЛК → TEST3» — в Настройка → ЛК ЕСИА Финанс (без режима разработки)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
This commit is contained in:
@@ -213,9 +213,10 @@ func realTestOnExecuted(ctx context.Context, rc *RuntimeConfig, guid string, rej
|
||||
log.Printf("real-test: %s — итог в ЛК: %s (%s)", shortGUID(guid), status, reason)
|
||||
}
|
||||
|
||||
// registerRealNSDTest — POST /admin/m2m-testing/real-nsd: включить/выключить тест и список клиентов.
|
||||
// registerRealNSDTest — POST /admin/setup/lk-real-nsd: включить/выключить тест и список клиентов
|
||||
// (в «Настройка → ЛК ЕСИА Финанс», доступно без режима разработки — право «настройка»).
|
||||
func registerRealNSDTest(mux *http.ServeMux, rc *RuntimeConfig) {
|
||||
mux.HandleFunc("/admin/m2m-testing/real-nsd", func(w http.ResponseWriter, r *http.Request) {
|
||||
mux.HandleFunc("/admin/setup/lk-real-nsd", func(w http.ResponseWriter, r *http.Request) {
|
||||
if r.Method != http.MethodPost {
|
||||
http.Error(w, "method", http.StatusMethodNotAllowed)
|
||||
return
|
||||
@@ -228,6 +229,19 @@ func registerRealNSDTest(mux *http.ServeMux, rc *RuntimeConfig) {
|
||||
return
|
||||
}
|
||||
log.Printf("real-test: %v, клиенты: %s", lk.RealNSDTest.Enabled, lk.RealNSDTest.Docs)
|
||||
http.Redirect(w, r, "/admin/m2m-testing#real-nsd", http.StatusSeeOther)
|
||||
back := "/admin/setup"
|
||||
if ref := r.Referer(); strings.Contains(ref, "/admin/m2m-testing") {
|
||||
back = "/admin/m2m-testing"
|
||||
}
|
||||
http.Redirect(w, r, back+"#lk-real-nsd", http.StatusSeeOther)
|
||||
})
|
||||
}
|
||||
|
||||
// realNSDAsText — тест-инвестор для подписи в настройках.
|
||||
func realNSDAsText() string {
|
||||
if globalRC == nil {
|
||||
return ""
|
||||
}
|
||||
l, f, m, sr, n := globalRC.Snapshot().LK.RealNSDTest.as()
|
||||
return strings.TrimSpace(l + " " + f + " " + m + ", " + sr + " " + n)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user