Documentation ¶
Index ¶
- Constants
- Variables
- func DoBenchmarkInsert(b *testing.B, client Client, rowCount int, concurrency int)
- func DoBenchmarkSelect(b *testing.B, client Client, rowCount, selCount int, concurrency int)
- func DoTestCRUD(t *testing.T, client Client)
- func SentenceFactory() string
- type AlertStatusRecord
- type Client
- type QueryResult
Constants ¶
View Source
const ( TestManager = "TEST_E2E_MANAGER" TestAgent = "TEST_E2E_AGENT" TestAlertsTable = "alerts.status" )
View Source
const TestEnvPrefix = "TEST_E2E"
Variables ¶
View Source
var ( TestConfig = config.Config{ LogLevel: "ERROR", HTTPServer: config.HTTPServerConfig{ Listen: func() string { listen := "localhost" if addr := os.Getenv(TestEnvPrefix + "_LISTEN_HOST"); addr != "" { listen = addr } if port := os.Getenv(TestEnvPrefix + "_LISTEN_PORT"); port != "" { return listen + ":" + port } return listen }(), }, OMNIbus: config.OMNIbus{ Clusters: func() map[string]config.SeedList { res := make(map[string]config.SeedList) for i, addr := range strings.Split(os.Getenv(TestEnvPrefix+"_ADDRESS"), ",") { res[fmt.Sprintf("OMNI_%d", i)] = config.SeedList{addr} } return res }(), ConnectionLabel: "TEST_E2E_QOORDINATOR", MaxConnections: 10, RandomFailOver: true, }, } TestUser = os.Getenv(TestEnvPrefix + "_USER") TestPassword = os.Getenv(TestEnvPrefix + "_PASSWORD") NcoSql = func() goqu.DialectWrapper { opts := goqu.DefaultDialectOptions() opts.QuoteRune = rune(32) opts.SupportsConflictTarget = false opts.SupportsWithCTE = false goqu.RegisterDialect("netcool", opts) return goqu.Dialect("netcool") }() )
Functions ¶
func DoBenchmarkInsert ¶
func DoBenchmarkSelect ¶
func DoTestCRUD ¶
func SentenceFactory ¶
func SentenceFactory() string
Types ¶
type AlertStatusRecord ¶
type AlertStatusRecord struct { Identifier string `faker:"uuid_hyphenated" db:"Identifier"` Node string `faker:"domain_name" db:"Node"` NodeAlias string `faker:"ipv4" db:"NodeAlias"` Agent string `faker:"-" db:"Agent"` Manager string `faker:"-" db:"Manager"` AlertGroup string `faker:"-" db:"AlertGroup"` AlertKey string `faker:"uuid_digit" db:"AlertKey"` Type uint8 `faker:"oneof: 1" db:"Type"` Severity uint8 `faker:"oneof: 2, 3, 4, 5" db:"Severity"` Summary string `faker:"sentence" db:"Summary"` FirstOccurrence int64 `faker:"unix_time" db:"FirstOccurrence"` URL string `faker:"url" db:"URL"` ExtendedAttr string `faker:"paragraph" db:"ExtendedAttr"` }
func AlertStatusRecordFactory ¶
func AlertStatusRecordFactory() AlertStatusRecord
func NewAlertStatusRecordFromMap ¶
func NewAlertStatusRecordFromMap(params map[string]any) AlertStatusRecord
Click to show internal directories.
Click to hide internal directories.