mirror of
https://github.com/googleapis/genai-toolbox.git
synced 2026-02-11 23:55:07 -05:00
cloud sql pg
This commit is contained in:
@@ -200,11 +200,10 @@ func TestCreateInstanceToolEndpoints(t *testing.T) {
|
||||
want: `{"name":"op2","status":"RUNNING"}`,
|
||||
},
|
||||
{
|
||||
name: "missing required parameter",
|
||||
toolName: "create-instance-prod",
|
||||
body: `{"name": "instance1"}`,
|
||||
expectError: true,
|
||||
errorStatus: http.StatusBadRequest,
|
||||
name: "missing required parameter",
|
||||
toolName: "create-instance-prod",
|
||||
body: `{"name": "instance1"}`,
|
||||
want: `{"error":"parameter \"project\" is required"}`,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -273,10 +273,11 @@ func TestPreCheckToolEndpoints(t *testing.T) {
|
||||
want: `{"preCheckResponse":[{"actionsRequired":["Fix this now."],"type":"","message":"This is a critical error.","messageType":"ERROR"}]}`,
|
||||
},
|
||||
{
|
||||
name: "instance not found",
|
||||
toolName: "precheck-tool",
|
||||
body: `{"project": "p1", "instance": "instance-notfound", "targetDatabaseVersion": "POSTGRES_18"}`,
|
||||
want: `{"error":"Not authorized to access instance"}`,
|
||||
name: "instance not found",
|
||||
toolName: "precheck-tool",
|
||||
body: `{"project": "p1", "instance": "instance-notfound", "targetDatabaseVersion": "POSTGRES_18"}`,
|
||||
want: `{"error":"failed to access GCP resource: googleapi: got HTTP response code 403 with body: Not authorized to access instance\n"}`,
|
||||
expectError: true,
|
||||
},
|
||||
{
|
||||
name: "missing required parameter - project",
|
||||
|
||||
Reference in New Issue
Block a user