dbtests

package
v0.15.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 24, 2026 License: MIT Imports: 11 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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

func RunAllTests(t *testing.T, client types.DB)

RunAllTests runs all database compliance tests. This is a convenience function for plugin implementations.

func TestChannelProcessingState_EdgeCases

func TestChannelProcessingState_EdgeCases(t *testing.T, client types.DB)

TestChannelProcessingState_EdgeCases tests edge cases for channel processing state.

func TestConcurrentMoveMapping

func TestConcurrentMoveMapping(t *testing.T, client types.DB)

TestConcurrentMoveMapping tests concurrent move mapping operations.

func TestConcurrentSaveIssue

func TestConcurrentSaveIssue(t *testing.T, client types.DB)

TestConcurrentSaveIssue tests concurrent writes to the same issue.

func TestContextCancellation

func TestContextCancellation(t *testing.T, client types.DB)

TestContextCancellation tests that operations respect context cancellation.

func TestCreatingAndFindingChannelProcessingState

func TestCreatingAndFindingChannelProcessingState(t *testing.T, client types.DB)

func TestCreatingAndFindingMoveMappings

func TestCreatingAndFindingMoveMappings(t *testing.T, client types.DB)

func TestDeletingMoveMappings

func TestDeletingMoveMappings(t *testing.T, client types.DB)

func TestFindActiveChannels

func TestFindActiveChannels(t *testing.T, client types.DB)

func TestFindActiveChannels_ManyChannels

func TestFindActiveChannels_ManyChannels(t *testing.T, client types.DB)

TestFindActiveChannels_ManyChannels tests finding active channels with many channels.

func TestFindIssueBySlackPostID

func TestFindIssueBySlackPostID(t *testing.T, client types.DB)

func TestFindOpenIssueByCorrelationID

func TestFindOpenIssueByCorrelationID(t *testing.T, client types.DB)

func TestInit

func TestInit(t *testing.T, client types.DB)

TestInit verifies that database initialization works correctly. It tests basic initialization and idempotent calls.

func TestInit_WithSchemaValidation

func TestInit_WithSchemaValidation(t *testing.T, client types.DB)

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

func TestInsightsLoadOpenIssues(t *testing.T, db types.DB, reader types.InsightsReader)

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

func TestLoadOpenIssuesInChannel(t *testing.T, client types.DB)

func TestLoadOpenIssuesInChannel_LargeDataset

func TestLoadOpenIssuesInChannel_LargeDataset(t *testing.T, client types.DB)

TestLoadOpenIssuesInChannel_LargeDataset tests loading many issues from a channel.

func TestMoveIssue

func TestMoveIssue(t *testing.T, client types.DB)

func TestMoveIssue_EdgeCases

func TestMoveIssue_EdgeCases(t *testing.T, client types.DB)

TestMoveIssue_EdgeCases tests edge cases for moving issues between channels.

func TestSaveAlert

func TestSaveAlert(t *testing.T, client types.DB)

func TestSaveIssue

func TestSaveIssue(t *testing.T, client types.DB)

func TestSaveIssue_ComplexAlert

func TestSaveIssue_ComplexAlert(t *testing.T, client types.DB)

TestSaveIssue_ComplexAlert tests saving issues with complex alert data.

func TestSaveIssues

func TestSaveIssues(t *testing.T, client types.DB)

func TestSpecialCharactersInCorrelationID

func TestSpecialCharactersInCorrelationID(t *testing.T, client types.DB)

TestSpecialCharactersInCorrelationID tests handling of special characters.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL