Changeset 0.29.0 (#195)

This commit is contained in:
2026-03-17 16:28:47 +00:00
parent 128cbb8174
commit 5d637d3a90
129 changed files with 9418 additions and 3016 deletions

View File

@@ -689,11 +689,11 @@ func TestTask_WorkflowTypeRejected(t *testing.T) {
// Task Type RBAC (v0.28.7)
// ═══════════════════════════════════════════════
func TestTask_StarlarkTypeRejected(t *testing.T) {
func TestTask_StarlarkTypeRequiresPackageID(t *testing.T) {
h := setupHarness(t)
_, token := h.createAdminUser("staruser", "staruser@test.com")
// Even admin cannot create starlark tasks — executor doesn't exist yet
// Starlark tasks require system_function (package_id)
w := h.request("POST", "/api/v1/tasks", token, map[string]interface{}{
"name": "Starlark Task",
"task_type": "starlark",
@@ -702,11 +702,11 @@ func TestTask_StarlarkTypeRejected(t *testing.T) {
"model_id": "m",
})
if w.Code != http.StatusBadRequest {
t.Fatalf("starlark task_type: want 400, got %d: %s", w.Code, w.Body.String())
t.Fatalf("starlark task_type without package_id: want 400, got %d: %s", w.Code, w.Body.String())
}
body := w.Body.String()
if !strings.Contains(body, "v0.29.0") {
t.Fatalf("expected 'v0.29.0' in error, got: %s", body)
if !strings.Contains(body, "system_function") && !strings.Contains(body, "package_id") {
t.Fatalf("expected 'system_function' or 'package_id' in error, got: %s", body)
}
}