Documentation ¶
Index ¶
- func AssertBucketsEqual(t *testing.T, expected, actual *agentpb.MetricsBucket) bool
- func FormatBuckets(mb []*agentpb.MetricsBucket) string
- func GetTestMongoDBDSN(tb testing.TB) string
- func GetTestMongoDBWithSSLDSN(tb testing.TB, pathToRoot string) (string, *agentpb.TextFiles)
- func GetTestMySQLDSN(tb testing.TB) string
- func GetTestPostgreSQLDSN(tb testing.TB) string
- func LogTable(t *testing.T, structs []reform.Struct)
- func MongoDBVersion(t testing.TB, client *mongo.Client) string
- func OpenTestMongoDB(tb testing.TB, dsn string) *mongo.Client
- func OpenTestMySQL(tb testing.TB) *sql.DB
- func OpenTestPostgreSQL(tb testing.TB) *sql.DB
- func PostgreSQLVersion(tb testing.TB, db *sql.DB) string
- type MySQLVendor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AssertBucketsEqual ¶
func AssertBucketsEqual(t *testing.T, expected, actual *agentpb.MetricsBucket) bool
AssertBucketsEqual asserts that two MetricsBuckets are equal while providing a good diff.
func FormatBuckets ¶
func FormatBuckets(mb []*agentpb.MetricsBucket) string
FormatBuckets formats MetricsBuckets to string for tests.
func GetTestMongoDBDSN ¶
GetTestMongoDBDSN returns DNS for MongoDB test database.
func GetTestMongoDBWithSSLDSN ¶
GetTestMongoDBWithSSLDSN returns DNS template and files for MongoDB test database with ssl.
func GetTestMySQLDSN ¶
GetTestMySQLDSN returns DNS for MySQL test database.
func GetTestPostgreSQLDSN ¶
GetTestPostgreSQLDSN returns DNS for PostgreSQL test database.
func MongoDBVersion ¶
MongoDBVersion returns Mongo DB version.
func OpenTestMongoDB ¶
OpenTestMongoDB opens connection to MongoDB test database.
func OpenTestMySQL ¶
OpenTestMySQL opens connection to MySQL test database.
func OpenTestPostgreSQL ¶
OpenTestPostgreSQL opens connection to PostgreSQL test database.
Types ¶
type MySQLVendor ¶
type MySQLVendor string
MySQLVendor represents MySQL vendor (Oracle, Percona).
const ( OracleMySQL MySQLVendor = "oracle" PerconaMySQL MySQLVendor = "percona" MariaDBMySQL MySQLVendor = "mariadb" )
MySQL vendors.
func MySQLVersion ¶
MySQLVersion returns MAJOR.MINOR MySQL version (e.g. "5.6", "8.0", etc.) and vendor.