Preserve manager skill bootstrap work
This commit is contained in:
@@ -395,3 +395,21 @@ func TestOpenChatRejectsUnrunnableCLI(t *testing.T) {
|
||||
t.Fatal("a missing CLI must fail detection, not open an endpoint")
|
||||
}
|
||||
}
|
||||
|
||||
func TestChatActivateSkillV2Shape(t *testing.T) {
|
||||
var path, body string
|
||||
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
|
||||
path = r.URL.Path
|
||||
data := make([]byte, r.ContentLength)
|
||||
_, _ = r.Body.Read(data)
|
||||
body = string(data)
|
||||
w.WriteHeader(http.StatusNoContent)
|
||||
}))
|
||||
defer srv.Close()
|
||||
if err := NewChat(&Connection{Backend: "v2", URL: srv.URL}).ActivateSkill(context.Background(), "ses_1", "pipelines-manager"); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if path != "/api/experimental/session/ses_1/skill" || body != `{"id":"pipelines-manager","resume":false}` {
|
||||
t.Fatalf("activate request = %s %s", path, body)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user