Documentation
¶
Index ¶
- func RunAllInsightsTests(t *testing.T, db types.DB, sink types.InsightsSink, ...)
- func RunAllTests(t *testing.T, client types.DB)
- func TestChannelProcessingState_EdgeCases(t *testing.T, client types.DB)
- func TestConcurrentMoveMapping(t *testing.T, client types.DB)
- func TestConcurrentSaveIssue(t *testing.T, client types.DB)
- func TestContextCancellation(t *testing.T, client types.DB)
- func TestCreatingAndFindingChannelProcessingState(t *testing.T, client types.DB)
- func TestCreatingAndFindingMoveMappings(t *testing.T, client types.DB)
- func TestDeletingMoveMappings(t *testing.T, client types.DB)
- func TestFindActiveChannels(t *testing.T, client types.DB)
- func TestFindActiveChannels_ManyChannels(t *testing.T, client types.DB)
- func TestFindIssueBySlackPostID(t *testing.T, client types.DB)
- func TestFindOpenIssueByCorrelationID(t *testing.T, client types.DB)
- func TestInit(t *testing.T, client types.DB)
- func TestInit_WithSchemaValidation(t *testing.T, client types.DB)
- func TestInsightsCount(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestInsightsCountFilters(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestInsightsListPagination(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestInsightsLoadOpenIssues(t *testing.T, db types.DB, reader types.InsightsReader)
- func TestInsightsTooManyRows(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestInsightsValueStats(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestInsightsWriteAndList(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
- func TestLoadOpenIssuesInChannel(t *testing.T, client types.DB)
- func TestLoadOpenIssuesInChannel_LargeDataset(t *testing.T, client types.DB)
- func TestMoveIssue(t *testing.T, client types.DB)
- func TestMoveIssue_EdgeCases(t *testing.T, client types.DB)
- func TestSaveAlert(t *testing.T, client types.DB)
- func TestSaveIssue(t *testing.T, client types.DB)
- func TestSaveIssue_ComplexAlert(t *testing.T, client types.DB)
- func TestSaveIssues(t *testing.T, client types.DB)
- func TestSpecialCharactersInCorrelationID(t *testing.T, client types.DB)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunAllInsightsTests ¶ added in v0.8.0
func RunAllInsightsTests(t *testing.T, db types.DB, sink types.InsightsSink, reader types.InsightsReader)
RunAllInsightsTests runs all insights compliance tests against an implementation of types.InsightsSink and types.InsightsReader. The db is used to create issues for TestInsightsLoadOpenIssues.
Each test uses unique channel IDs, so the tests can run against a database that already contains other events. Events are written with timestamps within the last two hours.
func RunAllTests ¶
RunAllTests runs all database compliance tests. This is a convenience function for plugin implementations.
func TestChannelProcessingState_EdgeCases ¶
TestChannelProcessingState_EdgeCases tests edge cases for channel processing state.
func TestConcurrentMoveMapping ¶
TestConcurrentMoveMapping tests concurrent move mapping operations.
func TestConcurrentSaveIssue ¶
TestConcurrentSaveIssue tests concurrent writes to the same issue.
func TestContextCancellation ¶
TestContextCancellation tests that operations respect context cancellation.
func TestFindActiveChannels_ManyChannels ¶
TestFindActiveChannels_ManyChannels tests finding active channels with many channels.
func TestInit ¶
TestInit verifies that database initialization works correctly. It tests basic initialization and idempotent calls.
func TestInit_WithSchemaValidation ¶
TestInit_WithSchemaValidation verifies initialization with schema validation enabled.
func TestInsightsCount ¶ added in v0.8.0
func TestInsightsCount(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsCount verifies grouping, time buckets, distinct counts and top-N ordering.
func TestInsightsCountFilters ¶ added in v0.8.0
func TestInsightsCountFilters(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsCountFilters verifies every filter field.
func TestInsightsListPagination ¶ added in v0.8.0
func TestInsightsListPagination(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsListPagination verifies cursor-based pagination in both directions.
func TestInsightsLoadOpenIssues ¶ added in v0.8.0
TestInsightsLoadOpenIssues verifies loading open issues across channels.
func TestInsightsTooManyRows ¶ added in v0.8.0
func TestInsightsTooManyRows(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsTooManyRows verifies that count and stats queries without an explicit limit fail with types.ErrInsightsTooManyRows instead of returning a truncated result, and that an explicit limit truncates.
func TestInsightsValueStats ¶ added in v0.8.0
func TestInsightsValueStats(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsValueStats verifies numeric value aggregates.
func TestInsightsWriteAndList ¶ added in v0.8.0
func TestInsightsWriteAndList(t *testing.T, sink types.InsightsSink, reader types.InsightsReader)
TestInsightsWriteAndList verifies that all event fields round-trip through the sink and reader.
func TestLoadOpenIssuesInChannel_LargeDataset ¶
TestLoadOpenIssuesInChannel_LargeDataset tests loading many issues from a channel.
func TestMoveIssue_EdgeCases ¶
TestMoveIssue_EdgeCases tests edge cases for moving issues between channels.
func TestSaveIssue_ComplexAlert ¶
TestSaveIssue_ComplexAlert tests saving issues with complex alert data.
Types ¶
This section is empty.