@@ -132,12 +132,20 @@ func TestCloudSQLPgSimpleToolEndpoints(t *testing.T) {
132132 teardownTable2 := tests .SetupPostgresSQLTable (t , ctx , pool , createAuthTableStmt , insertAuthTableStmt , tableNameAuth , authTestParams )
133133 defer teardownTable2 (t )
134134
135+ // Set up table for semantic search
136+ vectorTableName , tearDownVectorTable := tests .SetupPostgresVectorTable (t , ctx , pool )
137+ defer tearDownVectorTable (t )
138+
135139 // Write config into a file and pass it to command
136140 toolsFile := tests .GetToolsConfig (sourceConfig , CloudSQLPostgresToolKind , paramToolStmt , idParamToolStmt , nameParamToolStmt , arrayToolStmt , authToolStmt )
137141 toolsFile = tests .AddExecuteSqlConfig (t , toolsFile , "postgres-execute-sql" )
138142 tmplSelectCombined , tmplSelectFilterCombined := tests .GetPostgresSQLTmplToolStatement ()
139143 toolsFile = tests .AddTemplateParamConfig (t , toolsFile , CloudSQLPostgresToolKind , tmplSelectCombined , tmplSelectFilterCombined , "" )
140144
145+ // Add semantic search tool config
146+ insertStmt , searchStmt := tests .GetPostgresVectorSearchStmts (vectorTableName )
147+ toolsFile = tests .AddSemanticSearchConfig (t , toolsFile , CloudSQLPostgresToolKind , insertStmt , searchStmt )
148+
141149 toolsFile = tests .AddPostgresPrebuiltConfig (t , toolsFile )
142150 cmd , cleanup , err := tests .StartCmd (ctx , toolsFile , args ... )
143151 if err != nil {
@@ -186,6 +194,7 @@ func TestCloudSQLPgSimpleToolEndpoints(t *testing.T) {
186194 tests .RunPostgresListDatabaseStatsTest (t , ctx , pool )
187195 tests .RunPostgresListRolesTest (t , ctx , pool )
188196 tests .RunPostgresListStoredProcedureTest (t , ctx , pool )
197+ tests .RunSemanticSearchToolInvokeTest (t , "null" , "" , "The quick brown fox" )
189198}
190199
191200// Test connection with different IP type
0 commit comments