Documentation
¶
Index ¶
- Variables
- func AddExecuteSqlConfig(t *testing.T, config map[string]any, toolKind string) map[string]any
- func AddMSSQLExecuteSqlConfig(t *testing.T, config map[string]any) map[string]any
- func AddMSSQLPrebuiltToolConfig(t *testing.T, config map[string]any) map[string]any
- func AddMySQLPrebuiltToolConfig(t *testing.T, config map[string]any) map[string]any
- func AddMySqlExecuteSqlConfig(t *testing.T, config map[string]any) map[string]any
- func AddPostgresPrebuiltConfig(t *testing.T, config map[string]any) map[string]any
- func AddTemplateParamConfig(t *testing.T, config map[string]any, ...) map[string]any
- func CleanupMSSQLTables(t *testing.T, ctx context.Context, pool *sql.DB)
- func CleanupMySQLTables(t *testing.T, ctx context.Context, pool *sql.DB)
- func CleanupPostgresTables(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func GetCloudSQLDialOpts(ipType string) ([]cloudsqlconn.DialOption, error)
- func GetGoogleIdToken(audience string) (string, error)
- func GetMSSQLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetMSSQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
- func GetMSSQLTmplToolStatement() (string, string)
- func GetMSSQLWants() (string, string, string, string)
- func GetMySQLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetMySQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
- func GetMySQLTmplToolStatement() (string, string)
- func GetMySQLWants() (string, string, string, string)
- func GetPostgresSQLAuthToolInfo(tableName string) (string, string, string, []any)
- func GetPostgresSQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
- func GetPostgresSQLTmplToolStatement() (string, string)
- func GetPostgresWants() (string, string, string, string)
- func GetRedisValkeyToolsConfig(sourceConfig map[string]any, toolKind string) map[string]any
- func GetRedisValkeyWants() (string, string, string, string, string, string, string)
- func GetToolsConfig(sourceConfig map[string]any, ...) map[string]any
- func RunExecuteSqlToolInvokeTest(t *testing.T, createTableStatement, select1Want string, ...)
- func RunInitialize(t *testing.T, protocolVersion string) string
- func RunMCPToolCallMethod(t *testing.T, myFailToolWant, select1Want string, options ...McpTestOption)
- func RunMSSQLListTablesTest(t *testing.T, tableNameParam, tableNameAuth string)
- func RunMySQLGetQueryPlanTest(t *testing.T, ctx context.Context, pool *sql.DB, ...)
- func RunMySQLListActiveQueriesTest(t *testing.T, ctx context.Context, pool *sql.DB)
- func RunMySQLListTableFragmentationTest(t *testing.T, databaseName, tableNameParam, tableNameAuth string)
- func RunMySQLListTablesMissingUniqueIndexes(t *testing.T, ctx context.Context, pool *sql.DB, databaseName string)
- func RunMySQLListTablesTest(t *testing.T, ...)
- func RunPostgresDatabaseOverviewTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresGetColumnCardinalityTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListActiveQueriesTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListAvailableExtensionsTest(t *testing.T)
- func RunPostgresListDatabaseStatsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListIndexesTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListInstalledExtensionsTest(t *testing.T)
- func RunPostgresListLocksTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListPgSettingsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListPublicationTablesTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListQueryStatsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListRolesTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListSchemasTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListSequencesTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListTableSpacesTest(t *testing.T)
- func RunPostgresListTableStatsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListTablesTest(t *testing.T, tableNameParam, tableNameAuth, user string)
- func RunPostgresListTriggersTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresListViewsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresLongRunningTransactionsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunPostgresReplicationStatsTest(t *testing.T, ctx context.Context, pool *pgxpool.Pool)
- func RunRequest(t *testing.T, method, url string, body io.Reader, headers map[string]string) (*http.Response, []byte)
- func RunSourceConnectionTest(t *testing.T, sourceConfig map[string]any, toolKind string) error
- func RunToolGetTest(t *testing.T)
- func RunToolGetTestByName(t *testing.T, name string, want map[string]any)
- func RunToolInvokeParametersTest(t *testing.T, name string, params []byte, simpleWant string)
- func RunToolInvokeSimpleTest(t *testing.T, name string, simpleWant string)
- func RunToolInvokeTest(t *testing.T, select1Want string, options ...InvokeTestOption)
- func RunToolInvokeWithTemplateParameters(t *testing.T, tableName string, options ...TemplateParamOption)
- func SetupMsSQLTable(t *testing.T, ctx context.Context, pool *sql.DB, ...) func(*testing.T)
- func SetupMySQLTable(t *testing.T, ctx context.Context, pool *sql.DB, ...) func(*testing.T)
- func SetupPostgresSQLTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool, ...) func(*testing.T)
- func TestCloudSQLMySQL_IPTypeParsingFromYAML(t *testing.T)
- type CmdExec
- type ExecuteSqlOption
- type ExecuteSqlTestConfig
- type InvokeTestConfig
- type InvokeTestOption
- func DisableArrayTest() InvokeTestOption
- func DisableOptionalNullParamTest() InvokeTestOption
- func DisableSelect1AuthTest() InvokeTestOption
- func DisableSelect1Test() InvokeTestOption
- func EnableClientAuthTest() InvokeTestOption
- func WithMyArrayToolWant(s string) InvokeTestOption
- func WithMyAuthToolWant(s string) InvokeTestOption
- func WithMyToolById4Want(s string) InvokeTestOption
- func WithMyToolId3NameAliceWant(s string) InvokeTestOption
- func WithNullWant(s string) InvokeTestOption
- type MCPTestConfig
- type McpTestOption
- type TemplateParamOption
- func DisableDdlTest() TemplateParamOption
- func DisableInsertTest() TemplateParamOption
- func DisableSelectFilterTest() TemplateParamOption
- func WithCreateColArray(s string) TemplateParamOption
- func WithDdlWant(s string) TemplateParamOption
- func WithInsert1Want(s string) TemplateParamOption
- func WithNameColFilter(s string) TemplateParamOption
- func WithNameFieldArray(s string) TemplateParamOption
- func WithSelectAllWant(s string) TemplateParamOption
- func WithSelectEmptyWant(s string) TemplateParamOption
- func WithTmplSelectId1Want(s string) TemplateParamOption
- func WithTmplSelectNameWant(s string) TemplateParamOption
- type TemplateParameterTestConfig
Constants ¶
This section is empty.
Variables ¶
var ClientId = os.Getenv("CLIENT_ID")
var ServiceAccountEmail = os.Getenv("SERVICE_ACCOUNT_EMAIL")
Functions ¶
func AddExecuteSqlConfig ¶ added in v0.17.0
AddExecuteSqlConfig gets the tools config for `execute-sql` tools
func AddMSSQLExecuteSqlConfig ¶ added in v0.9.0
AddMSSQLExecuteSqlConfig gets the tools config for `mssql-execute-sql`
func AddMSSQLPrebuiltToolConfig ¶ added in v0.16.0
AddMSSQLPrebuiltToolConfig gets the tools config for mssql prebuilt tools
func AddMySQLPrebuiltToolConfig ¶ added in v0.15.0
AddMySQLPrebuiltToolConfig gets the tools config for mysql prebuilt tools
func AddMySqlExecuteSqlConfig ¶ added in v0.6.0
AddMySqlExecuteSqlConfig gets the tools config for `mysql-execute-sql`
func AddPostgresPrebuiltConfig ¶ added in v0.19.0
func AddTemplateParamConfig ¶ added in v0.7.0
func CleanupMSSQLTables ¶ added in v0.17.0
Finds and drops all tables in an mssql database.
func CleanupMySQLTables ¶ added in v0.17.0
Finds and drops all tables in a mysql database.
func CleanupPostgresTables ¶ added in v0.17.0
Finds and drops all tables in a postgres database.
func GetCloudSQLDialOpts ¶
func GetCloudSQLDialOpts(ipType string) ([]cloudsqlconn.DialOption, error)
GetCloudSQLDialOpts returns cloud sql connector's dial option for ip type.
func GetGoogleIdToken ¶
GetGoogleIdToken retrieve and return the Google ID token
func GetMSSQLAuthToolInfo ¶ added in v0.9.0
GetMSSQLAuthToolInfo returns statements and param of my-auth-tool for mssql-sql kind
func GetMSSQLParamToolInfo ¶ added in v0.9.0
func GetMSSQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
GetMSSQLParamToolInfo returns statements and param for my-tool mssql-sql kind
func GetMSSQLTmplToolStatement ¶ added in v0.9.0
GetMSSQLTmplToolStatement returns statements and param for template parameter test cases for mysql-sql kind
func GetMSSQLWants ¶ added in v0.9.0
GetMSSQLWants return the expected wants for mssql
func GetMySQLAuthToolInfo ¶ added in v0.9.0
GetMySQLAuthToolInfo returns statements and param of my-auth-tool for mysql-sql kind
func GetMySQLParamToolInfo ¶ added in v0.9.0
func GetMySQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
GetMySQLParamToolInfo returns statements and param for my-tool mysql-sql kind
func GetMySQLTmplToolStatement ¶ added in v0.9.0
GetMySQLTmplToolStatement returns statements and param for template parameter test cases for mysql-sql kind
func GetMySQLWants ¶ added in v0.9.0
GetMySQLWants return the expected wants for mysql
func GetPostgresSQLAuthToolInfo ¶
GetPostgresSQLAuthToolInfo returns statements and param of my-auth-tool for postgres-sql kind
func GetPostgresSQLParamToolInfo ¶
func GetPostgresSQLParamToolInfo(tableName string) (string, string, string, string, string, string, []any)
GetPostgresSQLParamToolInfo returns statements and param for my-tool postgres-sql kind
func GetPostgresSQLTmplToolStatement ¶ added in v0.7.0
GetPostgresSQLTmplToolStatement returns statements and param for template parameter test cases for postgres-sql kind
func GetPostgresWants ¶
GetPostgresWants return the expected wants for postgres
func GetRedisValkeyToolsConfig ¶ added in v0.8.0
func GetRedisValkeyWants ¶ added in v0.8.0
GetRedisWants return the expected wants for redis
func GetToolsConfig ¶
func GetToolsConfig(sourceConfig map[string]any, toolKind, paramToolStatement, idParamToolStmt, nameParamToolStmt, arrayToolStatement, authToolStatement string) map[string]any
GetToolsConfig returns a mock tools config file
func RunExecuteSqlToolInvokeTest ¶ added in v0.6.0
func RunExecuteSqlToolInvokeTest(t *testing.T, createTableStatement, select1Want string, options ...ExecuteSqlOption)
func RunInitialize ¶ added in v0.8.0
RunInitialize runs the initialize lifecycle for mcp to set up client-server connection
func RunMCPToolCallMethod ¶
func RunMCPToolCallMethod(t *testing.T, myFailToolWant, select1Want string, options ...McpTestOption)
RunMCPToolCallMethod runs the tool/call for mcp endpoint
func RunMSSQLListTablesTest ¶ added in v0.16.0
RunMSSQLListTablesTest run tests againsts the mssql-list-tables tools.
func RunMySQLGetQueryPlanTest ¶ added in v0.24.0
func RunMySQLListActiveQueriesTest ¶ added in v0.15.0
RunMySQLListActiveQueriesTest run tests against the mysql-list-active-queries tests
func RunMySQLListTableFragmentationTest ¶ added in v0.15.0
func RunMySQLListTablesMissingUniqueIndexes ¶ added in v0.15.0
func RunMySQLListTablesTest ¶ added in v0.15.0
func RunMySQLListTablesTest(t *testing.T, databaseName, tableNameParam, tableNameAuth, expectedOwner string)
RunMySQLListTablesTest run tests against the mysql-list-tables tool
func RunPostgresDatabaseOverviewTest ¶ added in v0.20.0
func RunPostgresGetColumnCardinalityTest ¶ added in v0.22.0
func RunPostgresListActiveQueriesTest ¶ added in v0.19.0
func RunPostgresListAvailableExtensionsTest ¶ added in v0.19.0
func RunPostgresListDatabaseStatsTest ¶ added in v0.23.0
RunPostgresDatabaseStatsTest tests the database_stats tool by comparing API results against a direct query to the database.
func RunPostgresListIndexesTest ¶ added in v0.20.0
func RunPostgresListInstalledExtensionsTest ¶ added in v0.19.0
func RunPostgresListLocksTest ¶ added in v0.21.0
RunPostgresListLocksTest runs tests for the postgres list-locks tool
func RunPostgresListPgSettingsTest ¶ added in v0.23.0
func RunPostgresListPublicationTablesTest ¶ added in v0.22.0
func RunPostgresListQueryStatsTest ¶ added in v0.22.0
func RunPostgresListRolesTest ¶ added in v0.23.0
func RunPostgresListSchemasTest ¶ added in v0.19.0
func RunPostgresListSequencesTest ¶ added in v0.20.0
func RunPostgresListTableSpacesTest ¶ added in v0.22.0
func RunPostgresListTableStatsTest ¶ added in v0.23.0
RunPostgresListTableStatsTest runs tests for the postgres list-table-stats tool
func RunPostgresListTablesTest ¶ added in v0.19.0
func RunPostgresListTriggersTest ¶ added in v0.20.0
func RunPostgresListViewsTest ¶ added in v0.19.0
func RunPostgresLongRunningTransactionsTest ¶ added in v0.21.0
RunPostgresLongRunningTransactionsTest runs tests for the postgres long-running-transactions tool
func RunPostgresReplicationStatsTest ¶ added in v0.21.0
RunPostgresReplicationStatsTest runs tests for the postgres replication-stats tool
func RunRequest ¶ added in v0.15.0
func RunRequest(t *testing.T, method, url string, body io.Reader, headers map[string]string) (*http.Response, []byte)
RunRequest is a helper function to send HTTP requests and return the response
func RunSourceConnectionTest ¶
RunSourceConnection test for source connection
func RunToolGetTestByName ¶ added in v0.10.0
func RunToolInvokeParametersTest ¶ added in v0.10.0
func RunToolInvokeSimpleTest ¶ added in v0.10.0
RunToolInvokeSimpleTest runs the tool invoke endpoint with no parameters
func RunToolInvokeTest ¶
func RunToolInvokeTest(t *testing.T, select1Want string, options ...InvokeTestOption)
RunToolInvoke runs the tool invoke endpoint
func RunToolInvokeWithTemplateParameters ¶ added in v0.7.0
func RunToolInvokeWithTemplateParameters(t *testing.T, tableName string, options ...TemplateParamOption)
RunToolInvokeWithTemplateParameters runs tool invoke test cases with template parameters.
func SetupMsSQLTable ¶
func SetupMsSQLTable(t *testing.T, ctx context.Context, pool *sql.DB, createStatement, insertStatement, tableName string, params []any) func(*testing.T)
SetupMsSQLTable creates and inserts data into a table of tool compatible with mssql-sql tool
func SetupMySQLTable ¶
func SetupMySQLTable(t *testing.T, ctx context.Context, pool *sql.DB, createStatement, insertStatement, tableName string, params []any) func(*testing.T)
SetupMySQLTable creates and inserts data into a table of tool compatible with mysql-sql tool
func SetupPostgresSQLTable ¶
func SetupPostgresSQLTable(t *testing.T, ctx context.Context, pool *pgxpool.Pool, createStatement, insertStatement, tableName string, params []any) func(*testing.T)
SetupPostgresSQLTable creates and inserts data into a table of tool compatible with postgres-sql tool
func TestCloudSQLMySQL_IPTypeParsingFromYAML ¶ added in v0.15.0
TestCloudSQLMySQL_IPTypeParsingFromYAML verifies the IPType field parsing from YAML for the cloud-sql-mysql source, mimicking the structure of tests in cloudsql_mysql_test.go.
Types ¶
type CmdExec ¶
type CmdExec struct {
Out io.ReadCloser
// contains filtered or unexported fields
}
CmdExec represents an invocation of a toolbox command.
func StartCmd ¶
func StartCmd(ctx context.Context, toolsFile map[string]any, args ...string) (*CmdExec, func(), error)
StartCmd returns a CmdExec representing a running instance of a toolbox command.
type ExecuteSqlOption ¶ added in v0.13.0
type ExecuteSqlOption func(*ExecuteSqlTestConfig)
func WithSelect1Statement ¶ added in v0.13.0
func WithSelect1Statement(s string) ExecuteSqlOption
WithSelect1Statement represents the database's statement for `SELECT 1`. e.g. tests.RunExecuteSqlToolInvokeTest(t, createTableStatement, select1Want, tests.WithSelect1Statement("custom"))
type ExecuteSqlTestConfig ¶ added in v0.13.0
type ExecuteSqlTestConfig struct {
// contains filtered or unexported fields
}
ExecuteSqlTestConfig represents the various configuration options for RunExecuteSqlToolInvokeTest()
type InvokeTestConfig ¶ added in v0.13.0
type InvokeTestConfig struct {
// contains filtered or unexported fields
}
InvokeTestConfig represents the various configuration options for RunToolInvokeTest()
type InvokeTestOption ¶ added in v0.13.0
type InvokeTestOption func(*InvokeTestConfig)
func DisableArrayTest ¶ added in v0.13.0
func DisableArrayTest() InvokeTestOption
DisableArrayTest disables tests for sources that do not support array. e.g. tests.RunToolInvokeTest(t, select1Want, tests.DisableArrayTest())
func DisableOptionalNullParamTest ¶ added in v0.13.0
func DisableOptionalNullParamTest() InvokeTestOption
DisableOptionalNullParamTest disables tests for optional null parameters. e.g. tests.RunToolInvokeTest(t, select1Want, tests.DisableOptionalNullParamTest())
func DisableSelect1AuthTest ¶ added in v0.16.0
func DisableSelect1AuthTest() InvokeTestOption
DisableSelect1AuthTest disables auth tests for sources that do not support SELECT 1 query. e.g. tests.RunToolInvokeTest(t, "", tests.DisableSelect1AuthTest())
func DisableSelect1Test ¶ added in v0.16.0
func DisableSelect1Test() InvokeTestOption
DisableSelect1Test disables tests for sources that do not support SELECT 1 query. e.g. tests.RunToolInvokeTest(t, "", tests.DisableSelect1Test())
func EnableClientAuthTest ¶ added in v0.13.0
func EnableClientAuthTest() InvokeTestOption
EnableClientAuthTest runs the client authorization tests. Only enable it if your source supports the `useClientOAuth` configuration. Currently, this should only be used with the BigQuery tests.
func WithMyArrayToolWant ¶ added in v0.16.0
func WithMyArrayToolWant(s string) InvokeTestOption
WithMyArrayToolWant represents the response value for my-array-tool. e.g. tests.RunToolInvokeTest(t, select1Want, tests.WithMyArrayToolWant("custom"))
func WithMyAuthToolWant ¶ added in v0.19.0
func WithMyAuthToolWant(s string) InvokeTestOption
WithMyAuthToolWant represents the response value for my-auth-tool. e.g. tests.RunToolInvokeTest(t, select1Want, tests.WithMyAuthToolWant("custom"))
func WithMyToolById4Want ¶ added in v0.13.0
func WithMyToolById4Want(s string) InvokeTestOption
WithMyToolById4Want represents the response value for my-tool-by-id with id=4. This response includes a null value column. e.g. tests.RunToolInvokeTest(t, select1Want, tests.WithMyToolById4Want("custom"))
func WithMyToolId3NameAliceWant ¶ added in v0.13.0
func WithMyToolId3NameAliceWant(s string) InvokeTestOption
WithMyToolId3NameAliceWant represents the response value for my-tool with id=3 and name=Alice. e.g. tests.RunToolInvokeTest(t, select1Want, tests.WithMyToolId3NameAliceWant("custom"))
func WithNullWant ¶ added in v0.13.0
func WithNullWant(s string) InvokeTestOption
WithNullWant represents a response value of null string. e.g. tests.RunToolInvokeTest(t, select1Want, tests.WithNullWant("custom"))
type MCPTestConfig ¶ added in v0.13.0
type MCPTestConfig struct {
// contains filtered or unexported fields
}
MCPTestConfig represents the various configuration options for mcp tool call tests.
type McpTestOption ¶ added in v0.13.0
type McpTestOption func(*MCPTestConfig)
func DisableMcpSelect1AuthTest ¶ added in v0.16.0
func DisableMcpSelect1AuthTest() McpTestOption
DisableMcpSelect1AuthTest disables the auth tool tests which use select 1.
func EnableMcpClientAuthTest ¶ added in v0.13.0
func EnableMcpClientAuthTest() McpTestOption
EnableMcpClientAuthTest runs the client authorization tests. Only enable it if your source supports the `useClientOAuth` configuration. Currently, this should only be used with the BigQuery tests.
func WithMcpMyToolId3NameAliceWant ¶ added in v0.13.0
func WithMcpMyToolId3NameAliceWant(s string) McpTestOption
WithMcpMyToolId3NameAliceWant represents the response value for my-tool with id=3 and name=Alice. e.g. tests.RunMCPToolCallMethod(t, mcpMyFailToolWant, tests.WithMcpMyToolId3NameAliceWant("custom"))
func WithMcpSelect1Want ¶ added in v0.23.0
func WithMcpSelect1Want(want string) McpTestOption
type TemplateParamOption ¶ added in v0.13.0
type TemplateParamOption func(*TemplateParameterTestConfig)
func DisableDdlTest ¶ added in v0.13.0
func DisableDdlTest() TemplateParamOption
DisableDdlTest disables tests for ddl statements for sources that do not support ddl. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.DisableDdlTest())
func DisableInsertTest ¶ added in v0.13.0
func DisableInsertTest() TemplateParamOption
DisableInsertTest disables tests of insert statements for sources that do not support insert. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.DisableInsertTest())
func DisableSelectFilterTest ¶ added in v0.16.0
func DisableSelectFilterTest() TemplateParamOption
DisableInsertTest disables tests of select-fields-templateParams-tool test. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.DisableSelectFilterTest())
func WithCreateColArray ¶ added in v0.8.0
func WithCreateColArray(s string) TemplateParamOption
WithCreateColArray represents the columns array parameter for create-table-templateParams-tool. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithCreateColArray("custom"))
func WithDdlWant ¶ added in v0.11.0
func WithDdlWant(s string) TemplateParamOption
WithDdlWant represents the response value of ddl statements. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithDdlWant("custom"))
func WithInsert1Want ¶ added in v0.11.0
func WithInsert1Want(s string) TemplateParamOption
WithInsert1Want represents the response value of insert-table-templateParams-tool. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithInsert1Want("custom"))
func WithNameColFilter ¶ added in v0.13.0
func WithNameColFilter(s string) TemplateParamOption
WithNameColFilter represents the columnFilter parameter for select-filter-templateParams-combined-tool. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithNameColFilter("custom"))
func WithNameFieldArray ¶ added in v0.13.0
func WithNameFieldArray(s string) TemplateParamOption
WithNameFieldArray represents fields array parameter for select-fields-templateParams-tool. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithNameFieldArray("custom"))
func WithSelectAllWant ¶ added in v0.8.0
func WithSelectAllWant(s string) TemplateParamOption
WithSelectAllWant represents the response value of select-templateParams-tool. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithSelectAllWant("custom"))
func WithSelectEmptyWant ¶ added in v0.11.0
func WithSelectEmptyWant(s string) TemplateParamOption
WithSelectEmptyWant represents the response value of select-templateParams-combined-tool with no results. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithSelectEmptyWant("custom"))
func WithTmplSelectId1Want ¶ added in v0.13.0
func WithTmplSelectId1Want(s string) TemplateParamOption
WithTmplSelectId1Want represents the response value of select-templateParams-combined-tool with id=1. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithTmplSelectId1Want("custom"))
func WithTmplSelectNameWant ¶ added in v0.16.0
func WithTmplSelectNameWant(s string) TemplateParamOption
WithTmplSelectNameWant represents the response value of select-filter-templateParams-combined-tool with name. e.g. tests.RunToolInvokeWithTemplateParameters(t, tableNameTemplateParam, tests.WithTmplSelectNameWant("custom"))
type TemplateParameterTestConfig ¶ added in v0.8.0
type TemplateParameterTestConfig struct {
// contains filtered or unexported fields
}
TemplateParameterTestConfig represents the various configuration options for template parameter tests.