Add task capture, work reports, daily digests and private contacts
Build and publish container images / images (push) Successful in 16m37s

This commit is contained in:
Anya Tokugawa committed 2026-11-01 22:28:16 +09:00
1 parent 50b8b0323f
commit b4792bb175
50 files changed
+2678 -17

No files matched your search

+32
View File
@@ -0,0 +1,32 @@
package server
import (
"bytes"
"context"
"encoding/json"
"net/http"
"net/http/httptest"
"os/exec"
"testing"
"time"
)
func TestTaskCLIHTTPIntegration(t *testing.T) {
if _, e := exec.LookPath("python3"); e != nil {
t.Skip("python3 not installed")
}
s, token, _, _ := taskFixture(t)
server := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
r.Host = "localhost"
s.withAuthorization(s.mux).ServeHTTP(w, r)
}))
defer server.Close()
ctx, cancel := context.WithTimeout(context.Background(), 30*time.Second)
defer cancel()
cmd := exec.CommandContext(ctx, "python3", "pages-cli/test_task_integration.py")
b, _ := json.Marshal(map[string]string{"origin": server.URL, "token": token, "root": t.TempDir()})
cmd.Stdin = bytes.NewReader(b)
if out, e := cmd.CombinedOutput(); e != nil {
t.Fatalf("CLI task integration %v: %s", e, out)
}
}