GUI und neue Erklärungen verwenden gemeinsam native_language. Deutsch und Russisch sind die beiden Muttersprachen; Englisch bleibt die Lernsprache. Kompatibilitätsfelder werden atomar gekoppelt, widersprüchliche Eingaben abgewiesen und bestehende Profile sowie eingefrorene Inhalte erhalten. Ergänzt vollständige russische GUI-Kataloge und 840 geprüfte Aufgabenansichten in sieben Modulen einschließlich A1-Test, mit getrennten Sprachrollen für Ausgangs- und Lernmaterial. Äquivalente Ansichten teilen ihre Nachweisidentität. Stabile API-Fehlercodes, neue deterministische Hilfen und Trainingsbegründungen berücksichtigen die Muttersprache. Dokumentiert das Sprachmodell in AGENTS.md. Validierung: Go-Race-Suite mit eigener lokaler PostgreSQL-Testdatenbank, go vet, Web-Build, Offline-Bank-/Variantenaudit, Diff-Prüfung sowie lokale Browser-Smokes für Sprachen, Kurs, Administration, Aussprache und Aufnahme. Keine Live-Anbieter, Produktionsprofile, Deployment-Schritte oder historischen Neubewertungen.
478 lines
16 KiB
Go
478 lines
16 KiB
Go
package httpapi
|
|
|
|
import (
|
|
"bytes"
|
|
"context"
|
|
"database/sql"
|
|
"encoding/json"
|
|
"fmt"
|
|
"io"
|
|
"log/slog"
|
|
"net/http"
|
|
"net/http/httptest"
|
|
"net/url"
|
|
"os"
|
|
"os/exec"
|
|
"path/filepath"
|
|
"runtime"
|
|
"sync"
|
|
"sync/atomic"
|
|
"syscall"
|
|
"testing"
|
|
"time"
|
|
|
|
_ "github.com/jackc/pgx/v5/stdlib"
|
|
"speech-learning-api/internal/config"
|
|
"speech-learning-api/internal/domain"
|
|
"speech-learning-api/internal/services"
|
|
"speech-learning-api/internal/store"
|
|
)
|
|
|
|
func aiHTTPFixture(t *testing.T, bankMode ...bool) (*httptest.Server, string, *store.AIStore) {
|
|
t.Helper()
|
|
dsn := os.Getenv("COURSE_TEST_DATABASE_URL")
|
|
if dsn == "" {
|
|
t.Skip("COURSE_TEST_DATABASE_URL not set")
|
|
}
|
|
admin, err := sql.Open("pgx", dsn)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
schema := store.NewID("ai_http")
|
|
if _, err = admin.Exec(`CREATE SCHEMA ` + schema); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
parsed, _ := url.Parse(dsn)
|
|
q := parsed.Query()
|
|
q.Set("search_path", schema)
|
|
parsed.RawQuery = q.Encode()
|
|
db, err := sql.Open("pgx", parsed.String())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
t.Cleanup(func() { db.Close(); admin.Exec(`DROP SCHEMA ` + schema + ` CASCADE`); admin.Close() })
|
|
ctx, cancel := context.WithCancel(context.Background())
|
|
t.Cleanup(cancel)
|
|
profiles := store.NewPostgresStore(db)
|
|
if err = profiles.Init(ctx); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
user, err := profiles.CreateUser(ctx, "ai-http@example.test", "hash", "de-DE")
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
profiles.CreateLearnerProfile(ctx, user.ID, "en-US", "A1", 10)
|
|
db.Exec(`UPDATE users SET role='admin' WHERE id=$1`, user.ID)
|
|
cfg := config.Config{JWTSecret: "ai-http-test-only", MistralAPIKey: "fixture-key", DeepSeekAPIKey: "fixture-key", AzureMock: true, CORSOrigins: []string{"http://localhost:15175"}}
|
|
if len(bankMode) > 1 && bankMode[1] {
|
|
cfg.PronunciationStrategy = "statistical"
|
|
}
|
|
var exerciseNumber atomic.Int32
|
|
a := services.NewAIService(store.NewAIStore(db), cfg)
|
|
provider := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
|
if r.URL.Path == "/models" {
|
|
json.NewEncoder(w).Encode(map[string]any{"data": []any{map[string]any{"id": "fixture-model", "context_window": 131072, "max_output_tokens": 16384}}})
|
|
return
|
|
}
|
|
var body struct {
|
|
Messages []struct {
|
|
Content string `json:"content"`
|
|
} `json:"messages"`
|
|
}
|
|
if err := json.NewDecoder(r.Body).Decode(&body); err != nil || len(body.Messages) != 2 {
|
|
t.Error("missing model messages")
|
|
http.Error(w, "bad", 400)
|
|
return
|
|
}
|
|
var request struct {
|
|
Task string `json:"task"`
|
|
Input json.RawMessage `json:"input"`
|
|
}
|
|
json.Unmarshal([]byte(body.Messages[1].Content), &request)
|
|
var result any
|
|
switch request.Task {
|
|
case "next_exercise":
|
|
var in struct {
|
|
Mode string `json:"training_mode"`
|
|
Required []string `json:"required_practice_words"`
|
|
Plan *domain.PronunciationPlan `json:"training_plan"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
word := "cat"
|
|
candidate := ""
|
|
if len(in.Required) > 0 {
|
|
word = in.Required[0]
|
|
}
|
|
if in.Mode == "transfer" {
|
|
word = "cup"
|
|
if in.Plan != nil {
|
|
for _, known := range in.Plan.KnownWords {
|
|
if known == word {
|
|
word = "school"
|
|
}
|
|
}
|
|
}
|
|
candidate = word
|
|
}
|
|
n := exerciseNumber.Add(1)
|
|
ref := fmt.Sprintf("I see a %s near %s.", word, []string{"home", "the lake", "the pond", "the shop", "the house", "the garden"}[int(n-1)%6])
|
|
result = domain.GeneratedExercise{ExerciseType: "repeat_sentence", TargetLanguage: "en-US", CEFRLevel: "A1", ReferenceText: ref, TTSText: ref, DisplayPrompt: "Sprich den Satz nach.", ReasonForChoice: "Kurze Übung anhand des gespeicherten Trainingsziels.", FocusPoints: []string{word}, SuccessCriteria: []string{"Sprich mit natürlichem Rhythmus."}, CandidateWord: candidate}
|
|
|
|
case "evaluate_course_attempt":
|
|
var in struct {
|
|
Answer string `json:"answer"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
score, verdict, issues := 100, "correct", []string{}
|
|
if in.Answer == "He have got a sister." {
|
|
score, verdict, issues = 60, "partial", []string{"has nach he verwenden"}
|
|
}
|
|
feedback := "Bewertung aus Testanbieter"
|
|
if in.Answer == "my name is Jack Hill. I live in city. My hobby is shwiming." {
|
|
score, verdict, issues = 80, "partial", []string{"Am Satzanfang My schreiben.", "in city muss in a city heißen.", "shwiming muss swimming heißen."}
|
|
feedback = "Inhalt erfüllt; My am Satzanfang, a city und swimming korrigieren."
|
|
}
|
|
result = map[string]any{"score": score, "verdict": verdict, "feedback": feedback, "issues": issues}
|
|
case "analyze_course_progress":
|
|
var in domain.CourseSnapshot
|
|
json.Unmarshal(request.Input, &in)
|
|
modules := []domain.ModuleAnalysis{}
|
|
for _, m := range in.Modules {
|
|
modules = append(modules, domain.ModuleAnalysis{ModuleID: m.ID, Strengths: []string{}, Weaknesses: []string{}, Recommendation: "Weiterlernen", Reason: "Aus gespeicherten Antworten", EvidenceIDs: []string{}})
|
|
}
|
|
result = domain.CourseAnalysis{SchemaVersion: 2, TargetLanguage: "en-US", CourseVersion: domain.CourseVersion, FactsVersion: in.FactsVersion, Summary: "Lernstand aus Testanbieter", RecommendedModuleID: "a1_family_v1", Modules: modules}
|
|
case "plan_course_task":
|
|
var in struct {
|
|
Module string `json:"module_id"`
|
|
Skill string `json:"requested_skill"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
if in.Skill == "" {
|
|
in.Skill = "grammar"
|
|
}
|
|
kind := "choice"
|
|
if in.Skill == "writing" {
|
|
kind = "free_text"
|
|
}
|
|
if in.Skill == "speaking" {
|
|
kind = "free_speech"
|
|
}
|
|
if in.Skill == "reading" {
|
|
kind = "short_text"
|
|
}
|
|
result = domain.CourseBrief{SchemaVersion: 2, ModuleID: in.Module, TargetLanguage: "en-US", CourseVersion: domain.CourseVersion, Skill: in.Skill, Kind: kind, Objective: "A1-Aufgabe", Difficulty: "A1", Reason: "Lernstand"}
|
|
case "author_course_task":
|
|
var in struct {
|
|
Brief domain.CourseBrief `json:"brief"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
task := domain.AdaptiveTask{SchemaVersion: 2, ModuleID: in.Brief.ModuleID, TargetLanguage: "en-US", CourseVersion: domain.CourseVersion, CEFRLevel: "A1", Skill: in.Brief.Skill, Kind: in.Brief.Kind, Prompt: "Aufgabe vom direkten Testanbieter", AnswerKey: &domain.TaskKey{Rubric: []string{"Verständliche A1-Antwort"}, Explanation: "Private Testlösung", ReferenceAnswer: "He has got a sister."}}
|
|
if task.Kind == "choice" {
|
|
task.Options = []domain.TaskOption{{ID: "o1", Label: "Anna"}, {ID: "o2", Label: "Bob"}, {ID: "o3", Label: "Tom"}}
|
|
task.AnswerKey.CorrectOptionID = "o1"
|
|
}
|
|
if task.Skill == "reading" {
|
|
task.Passage = "My name is Anna."
|
|
}
|
|
if task.Skill == "listening" {
|
|
task.AudioText = "My name is Anna."
|
|
}
|
|
result = map[string]any{"schema_version": 2, "tasks": []domain.AdaptiveTask{task}}
|
|
case "review_course_task":
|
|
var in struct {
|
|
Candidate struct {
|
|
Tasks []domain.AdaptiveTask `json:"tasks"`
|
|
} `json:"candidate"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
checks := []services.AIChoiceCheck{}
|
|
for i, task := range in.Candidate.Tasks {
|
|
if task.Kind == "choice" {
|
|
if task.AnswerKey != nil {
|
|
t.Error("authored key leaked to reviewer")
|
|
}
|
|
check := services.AIChoiceCheck{TaskIndex: i}
|
|
for n, option := range task.Options {
|
|
check.Options = append(check.Options, services.AIOptionCheck{OptionID: option.ID, IsCorrect: n == 0, Reason: "Fixture solution"})
|
|
}
|
|
checks = append(checks, check)
|
|
}
|
|
}
|
|
result = services.AIReview{SchemaVersion: 2, Approved: true, ChoiceChecks: checks, ReviewNotes: "Unabhängig gelöst"}
|
|
case "author_course_exam":
|
|
tasks, err := store.NewAdaptiveStore(db).ReserveExam(ctx, user.ID, "en-US", "a1_review_test_v1")
|
|
if err != nil {
|
|
t.Error(err)
|
|
}
|
|
for i := range tasks {
|
|
tasks[i].Source = ""
|
|
}
|
|
result = map[string]any{"schema_version": 2, "tasks": tasks}
|
|
case "review_course_exam":
|
|
var in struct {
|
|
Candidate struct {
|
|
Tasks []domain.AdaptiveTask `json:"tasks"`
|
|
} `json:"candidate"`
|
|
}
|
|
json.Unmarshal(request.Input, &in)
|
|
checks := []services.AIChoiceCheck{}
|
|
for i, task := range in.Candidate.Tasks {
|
|
if task.Kind == "choice" {
|
|
if task.AnswerKey != nil {
|
|
t.Error("authored key leaked to reviewer")
|
|
}
|
|
check := services.AIChoiceCheck{TaskIndex: i}
|
|
for n, option := range task.Options {
|
|
check.Options = append(check.Options, services.AIOptionCheck{OptionID: option.ID, IsCorrect: n == 0, Reason: "Fixture solution"})
|
|
}
|
|
checks = append(checks, check)
|
|
}
|
|
}
|
|
result = services.AIReview{SchemaVersion: 2, Approved: true, ChoiceChecks: checks, ReviewNotes: "Unabhängig gelöst"}
|
|
default:
|
|
t.Error("unexpected task", request.Task)
|
|
http.Error(w, "unsupported", 400)
|
|
return
|
|
}
|
|
output, _ := json.Marshal(result)
|
|
json.NewEncoder(w).Encode(map[string]any{"choices": []any{map[string]any{"finish_reason": "stop", "message": map[string]any{"content": string(output)}}}, "usage": map[string]any{"prompt_tokens": 100, "completion_tokens": 30}})
|
|
}))
|
|
t.Cleanup(provider.Close)
|
|
a.URLs["mistral"] = provider.URL
|
|
a.URLs["deepseek"] = provider.URL
|
|
auth := services.NewAuthService(profiles, cfg.JWTSecret)
|
|
logger := slog.New(slog.NewTextHandler(io.Discard, nil))
|
|
server := NewServer(cfg, logger, profiles, auth, services.NewAzureSpeechService(cfg, logger), a)
|
|
server.SetAIService(a)
|
|
engine := services.NewCourseEngine(store.NewAdaptiveStore(db), profiles, a, logger)
|
|
if len(bankMode) > 0 && bankMode[0] {
|
|
engine.Mode = "bank"
|
|
server.speech = bankFixtureSpeech{}
|
|
}
|
|
if len(bankMode) > 1 && bankMode[1] {
|
|
server.speech = statisticalFixtureSpeech{}
|
|
}
|
|
server.SetCourseEngine(engine)
|
|
go engine.Run(ctx)
|
|
api := httptest.NewServer(server.Routes())
|
|
t.Cleanup(api.Close)
|
|
token, _ := auth.IssueToken(user.ID)
|
|
return api, token, a.Repo
|
|
}
|
|
func aiHTTP(t *testing.T, api *httptest.Server, token, method, path string, body any) map[string]json.RawMessage {
|
|
t.Helper()
|
|
data, _ := json.Marshal(body)
|
|
req, _ := http.NewRequest(method, api.URL+path, bytes.NewReader(data))
|
|
req.Header.Set("Authorization", "Bearer "+token)
|
|
req.Header.Set("Content-Type", "application/json")
|
|
resp, err := api.Client().Do(req)
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
defer resp.Body.Close()
|
|
var result map[string]json.RawMessage
|
|
json.NewDecoder(resp.Body).Decode(&result)
|
|
if resp.StatusCode >= 300 {
|
|
t.Fatalf("%s %s: %d: %s", method, path, resp.StatusCode, result["error"])
|
|
}
|
|
return result
|
|
}
|
|
func TestAIAdminPostgresAPI(t *testing.T) {
|
|
api, token, repo := aiHTTPFixture(t)
|
|
settings := aiHTTP(t, api, token, "GET", "/admin/ai/settings", nil)
|
|
var profiles map[string]domain.AIProfile
|
|
json.Unmarshal(settings["profiles"], &profiles)
|
|
p := profiles["evaluate_course_attempt"]
|
|
p.Model = "fixture-model"
|
|
p.PricingSet = true
|
|
p.InputPrice = 1000000
|
|
p.OutputPrice = 2000000
|
|
p.ContextTokens = 131072
|
|
aiHTTP(t, api, token, "PUT", "/admin/ai/profiles/"+p.Action, p)
|
|
aiHTTP(t, api, token, "PUT", "/admin/ai/budget", map[string]int64{"monthly_limit_microusd": 1000000})
|
|
aiHTTP(t, api, token, "GET", "/admin/ai/providers/mistral/models", nil)
|
|
result := aiHTTP(t, api, token, "POST", "/admin/ai/quality", map[string]string{"request_id": "quality-request"})
|
|
var passed bool
|
|
json.Unmarshal(result["passed"], &passed)
|
|
if !passed {
|
|
t.Fatal("quality fixture failed", result)
|
|
}
|
|
// Same request must reuse both paid completions.
|
|
aiHTTP(t, api, token, "POST", "/admin/ai/quality", map[string]string{"request_id": "quality-request"})
|
|
report, err := repo.Usage(context.Background(), domain.AIUsageFilter{})
|
|
if err != nil || report.Total != 2 {
|
|
t.Fatal("duplicate API test billing", report, err)
|
|
}
|
|
c := aiHTTP(t, api, token, "GET", "/admin/ai/calls/"+report.Calls[0].ID, nil)
|
|
if bytes.Contains(c["input"], []byte("fixture-key")) {
|
|
t.Fatal("key leaked")
|
|
}
|
|
}
|
|
func TestAIBrowserSmoke(t *testing.T) {
|
|
if os.Getenv("AI_BROWSER_SMOKE") != "1" {
|
|
t.Skip("AI_BROWSER_SMOKE=1 enables Playwright against a disposable API")
|
|
}
|
|
api, token, _ := aiHTTPFixture(t)
|
|
_, file, _, _ := runtime.Caller(0)
|
|
web := filepath.Clean(filepath.Join(filepath.Dir(file), "../../../web"))
|
|
dev := exec.Command("npm", "run", "dev", "--", "--host", "127.0.0.1", "--port", "15175", "--strictPort")
|
|
dev.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
|
dev.Dir = web
|
|
dev.Env = append(os.Environ(), "VITE_API_BASE_URL="+api.URL)
|
|
var devOutput bytes.Buffer
|
|
dev.Stdout = &devOutput
|
|
dev.Stderr = &devOutput
|
|
if err := dev.Start(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
var stopOnce sync.Once
|
|
stopDev := func() {
|
|
stopOnce.Do(func() {
|
|
if dev.Process != nil {
|
|
syscall.Kill(-dev.Process.Pid, syscall.SIGTERM)
|
|
dev.Wait()
|
|
}
|
|
})
|
|
}
|
|
t.Cleanup(stopDev)
|
|
ready := false
|
|
for i := 0; i < 40; i++ {
|
|
resp, err := http.Get("http://localhost:15175")
|
|
if err == nil {
|
|
resp.Body.Close()
|
|
ready = true
|
|
break
|
|
}
|
|
time.Sleep(100 * time.Millisecond)
|
|
}
|
|
if !ready {
|
|
stopDev()
|
|
t.Fatal("Vite did not start", devOutput.String())
|
|
}
|
|
node := exec.Command("node", "tests/ai-admin.e2e.cjs")
|
|
node.Dir = web
|
|
node.Env = append(os.Environ(), "AI_E2E_API="+api.URL, "AI_E2E_TOKEN="+token, "AI_E2E_URL=http://localhost:15175")
|
|
output, err := node.CombinedOutput()
|
|
stopDev()
|
|
t.Log(string(output))
|
|
t.Log("Vite:", devOutput.String())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|
|
|
|
func TestBankBrowserSmoke(t *testing.T) {
|
|
if os.Getenv("BANK_BROWSER_SMOKE") != "1" {
|
|
t.Skip("BANK_BROWSER_SMOKE=1 enables Playwright against a disposable API")
|
|
}
|
|
api, token, _ := aiHTTPFixture(t, true)
|
|
_, file, _, _ := runtime.Caller(0)
|
|
web := filepath.Clean(filepath.Join(filepath.Dir(file), "../../../web"))
|
|
dev := exec.Command("npm", "run", "dev", "--", "--host", "127.0.0.1", "--port", "15175", "--strictPort")
|
|
dev.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
|
dev.Dir = web
|
|
dev.Env = append(os.Environ(), "VITE_API_BASE_URL="+api.URL)
|
|
var devOutput bytes.Buffer
|
|
dev.Stdout = &devOutput
|
|
dev.Stderr = &devOutput
|
|
if err := dev.Start(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
var stopOnce sync.Once
|
|
stopDev := func() {
|
|
stopOnce.Do(func() {
|
|
if dev.Process != nil {
|
|
syscall.Kill(-dev.Process.Pid, syscall.SIGTERM)
|
|
dev.Wait()
|
|
}
|
|
})
|
|
}
|
|
t.Cleanup(stopDev)
|
|
ready := false
|
|
for i := 0; i < 40; i++ {
|
|
resp, err := http.Get("http://localhost:15175")
|
|
if err == nil {
|
|
resp.Body.Close()
|
|
ready = true
|
|
break
|
|
}
|
|
time.Sleep(100 * time.Millisecond)
|
|
}
|
|
if !ready {
|
|
stopDev()
|
|
t.Fatal("Vite did not start", devOutput.String())
|
|
}
|
|
for _, check := range []struct{ script, language string }{
|
|
{"tests/languages.e2e.cjs", "de-DE"},
|
|
{"tests/course-variants.e2e.cjs", "ru-RU"},
|
|
{"tests/course-bank.e2e.cjs", "de-DE"},
|
|
{"tests/course-bank.e2e.cjs", "ru-RU"},
|
|
} {
|
|
node := exec.Command("node", check.script)
|
|
node.Dir = web
|
|
node.Env = append(os.Environ(), "AI_E2E_API="+api.URL, "AI_E2E_TOKEN="+token, "AI_E2E_URL=http://localhost:15175")
|
|
node.Env = append(node.Env, "UI_E2E_LANGUAGE="+check.language)
|
|
output, err := node.CombinedOutput()
|
|
t.Log(string(output))
|
|
if err != nil {
|
|
stopDev()
|
|
t.Fatal(check.script, check.language, err)
|
|
}
|
|
}
|
|
stopDev()
|
|
t.Log("Vite:", devOutput.String())
|
|
}
|
|
|
|
func TestPronunciationBrowserSmoke(t *testing.T) {
|
|
if os.Getenv("PRONUNCIATION_BROWSER_SMOKE") != "1" {
|
|
t.Skip("PRONUNCIATION_BROWSER_SMOKE=1 enables Playwright against a disposable API")
|
|
}
|
|
api, token, _ := aiHTTPFixture(t, true, true)
|
|
_, file, _, _ := runtime.Caller(0)
|
|
web := filepath.Clean(filepath.Join(filepath.Dir(file), "../../../web"))
|
|
dev := exec.Command("npm", "run", "dev", "--", "--host", "127.0.0.1", "--port", "15175", "--strictPort")
|
|
dev.SysProcAttr = &syscall.SysProcAttr{Setpgid: true}
|
|
dev.Dir = web
|
|
dev.Env = append(os.Environ(), "VITE_API_BASE_URL="+api.URL)
|
|
var devOutput bytes.Buffer
|
|
dev.Stdout = &devOutput
|
|
dev.Stderr = &devOutput
|
|
if err := dev.Start(); err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
var stopOnce sync.Once
|
|
stopDev := func() {
|
|
stopOnce.Do(func() {
|
|
if dev.Process != nil {
|
|
syscall.Kill(-dev.Process.Pid, syscall.SIGTERM)
|
|
dev.Wait()
|
|
}
|
|
})
|
|
}
|
|
t.Cleanup(stopDev)
|
|
ready := false
|
|
for i := 0; i < 40; i++ {
|
|
resp, err := http.Get("http://localhost:15175")
|
|
if err == nil {
|
|
resp.Body.Close()
|
|
ready = true
|
|
break
|
|
}
|
|
time.Sleep(100 * time.Millisecond)
|
|
}
|
|
if !ready {
|
|
stopDev()
|
|
t.Fatal("Vite did not start", devOutput.String())
|
|
}
|
|
node := exec.Command("node", "tests/pronunciation-profile.e2e.cjs")
|
|
node.Dir = web
|
|
node.Env = append(os.Environ(), "AI_E2E_API="+api.URL, "AI_E2E_TOKEN="+token, "AI_E2E_URL=http://localhost:15175")
|
|
output, err := node.CombinedOutput()
|
|
stopDev()
|
|
t.Log(string(output))
|
|
t.Log("Vite:", devOutput.String())
|
|
if err != nil {
|
|
t.Fatal(err)
|
|
}
|
|
}
|