You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
body: "{\"detail\": \"The following errors occurred:\\n- This endpoint does not support models that have versions published with `cog push`.\",\"errors\":[{\"detail\":\"This endpoint does not support models that have versions published with `cog push`.\",\"pointer\": \"/\"}],\"status\":400,\"title\":\"Validation failed\"}",
348
+
wantError: "This endpoint does not support models that have versions published with `cog push`.",
349
+
},
350
+
{
351
+
name: "model uses procedures",
352
+
body: "{\"detail\": \"The following errors occurred:\\n- You cannot use this mechanism to push versions of a model that uses pipelines.\",\"errors\":[{\"detail\":\"You cannot use this mechanism to push versions of a model that uses pipelines.\",\"pointer\": \"/\"}],\"status\":400,\"title\":\"Validation failed\"}",
353
+
wantError: "You cannot use this mechanism to push versions of a model that uses pipelines.",
354
+
},
355
+
} {
356
+
t.Run(tt.name, func(t*testing.T) {
357
+
// Setup mock web server for cog.replicate.com (token exchange)
versionResponse:="{\"detail\": \"The following errors occurred:\n- This endpoint does not support models that have versions published with `cog push`.\",\"errors\":[{\"detail\":\"This endpoint does not support models that have versions published with `cog push`.\",\"pointer\": \"/\",}],\"status\":400,\"title\":\"Validation failed\"}"
365
-
w.WriteHeader(http.StatusBadRequest)
366
-
w.Write([]byte(versionResponse))
367
-
case"/v1/models/user/test/releases":
368
-
// Mock release creation response - empty body with 204 status
0 commit comments