44d6d7a74d
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014FsEKyJrYF69Cj9ZXzFLRi
33 lines
700 B
Go
33 lines
700 B
Go
//go:build live
|
|
|
|
package lkgateway
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"encoding/json"
|
|
"fmt"
|
|
"os"
|
|
"testing"
|
|
)
|
|
|
|
// Только чтение: заявка из ЛК ЕСИА Финанс как её получает bj. LK_ID=70038
|
|
func TestLKClaimLive(t *testing.T) {
|
|
rc, err := NewRuntimeConfig("/var/lib/bj/.bj/setup.json")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
ep, ok := lkActiveEndpoint(rc)
|
|
if !ok {
|
|
t.Fatal("ЛК не настроен")
|
|
}
|
|
code, body, err := lkGet(context.Background(), ep, "/claims/"+os.Getenv("LK_ID"))
|
|
fmt.Println("HTTP", code, err)
|
|
var out bytes.Buffer
|
|
if json.Indent(&out, body, "", " ") == nil {
|
|
fmt.Println(out.String())
|
|
} else {
|
|
fmt.Println(string(body))
|
|
}
|
|
}
|