FakeTracerouteSnapshotRepository

A test double for TracerouteSnapshotRepository keyed by logUuid.

Use upsertSnapshotPositions as you would in production, or seedSnapshot to directly inject state for a log.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
open override fun getSnapshotPositions(logUuid: String): Flow<Map<Int, Position>>
Link copied to clipboard
fun lastRequestId(logUuid: String): Int?

Returns the last request-id recorded for logUuid, or null if none.

Link copied to clipboard
open fun reset()

Resets all registered state flows and custom actions to their initial state.

Link copied to clipboard
fun seedSnapshot(logUuid: String, positions: Map<Int, Position>)

Directly seeds the snapshot for a log (bypasses request-id tracking).

Link copied to clipboard
open suspend override fun upsertSnapshotPositions(logUuid: String, requestId: Int, positions: Map<Int, Position>)