Documentation
¶
Overview ¶
Package scantest populates media databases in tests through the production staging pipeline. It lives outside pkg/testing/helpers because it imports mediascanner, which the mediascanner package's own tests (which import helpers) must not see transitively.
Index ¶
- func IndexMediaPaths(tb testing.TB, db database.MediaDBI, systemID string, paths ...string) database.ScanReconcileStats
- func IndexMediaPathsWithOpts(tb testing.TB, db database.MediaDBI, systemID string, ...) database.ScanReconcileStats
- func IndexScanResults(tb testing.TB, db database.MediaDBI, systemID string, ...) database.ScanReconcileStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexMediaPaths ¶
func IndexMediaPaths( tb testing.TB, db database.MediaDBI, systemID string, paths ...string, ) database.ScanReconcileStats
IndexMediaPaths runs the given paths through the production staging pipeline for one system — canonical tag seeding, staging, set-based reconcile — and commits the result. It is the test-suite replacement for hand-driving the old AddMediaPath/ScanState flow. This helper uses ReconcileStagedSystem with default ScanReconcileOpts, so it is a full scan and marks unstaged media for the same system missing. Use IndexMediaPathsWithOpts with IncompleteScan: true for incremental updates.
func IndexMediaPathsWithOpts ¶
func IndexMediaPathsWithOpts( tb testing.TB, db database.MediaDBI, systemID string, opts database.ScanReconcileOpts, paths ...string, ) database.ScanReconcileStats
IndexMediaPathsWithOpts runs IndexMediaPaths with explicit ReconcileStagedSystem options, for callers that need incremental scans with IncompleteScan: true.
func IndexScanResults ¶ added in v2.18.0
func IndexScanResults( tb testing.TB, db database.MediaDBI, systemID string, opts database.ScanReconcileOpts, results ...platforms.ScanResult, ) database.ScanReconcileStats
IndexScanResults stages complete scanner results, including optional source provenance, through the production reconciliation pipeline.
Types ¶
This section is empty.