From 19abdd4b99c96afeb761da44f84d665cce49be8e Mon Sep 17 00:00:00 2001 From: Stefan Majewsky Date: Wed, 5 Aug 2026 22:47:46 +0200 Subject: pgtest: scan topology --- pgtest/tracker.go | 38 -------------------------------------- 1 file changed, 38 deletions(-) delete mode 100644 pgtest/tracker.go (limited to 'pgtest/tracker.go') diff --git a/pgtest/tracker.go b/pgtest/tracker.go deleted file mode 100644 index ebd53cd..0000000 --- a/pgtest/tracker.go +++ /dev/null @@ -1,38 +0,0 @@ -// SPDX-FileCopyrightText: 2026 Stefan Majewsky -// SPDX-License-Identifier: Apache-2.0 - -// Package pgtest contains test assertions for checking the contents of PostgreSQL databases. -package pgtest - -import ( - "go.xyrillian.de/gg/assert" - "go.xyrillian.de/gg/gsql" -) - -// Tracker keeps a copy of the database contents and allows for checking the database contents (or changes made to them) during tests. -type Tracker struct { - t assert.TestingTB - dbh gsql.Handle - s Snapshot -} - -// NewTracker creates a new Tracker. -// -// The initial creation involves taking a snapshot, which is returned as a second value. -// This is an optimization, since it is often desirable to assert on the full DB contents when creating the tracker. -// Calling [Tracker.DBContent] directly after [NewTracker] would take a superfluous second snapshot. -func NewTracker(t assert.TestingTB, db gsql.Handle) (*Tracker, Snapshot) { - panic("TODO") -} - -// DBChanges produces a diff of the current database contents against the state at the last Tracker call, -// as a set of INSERT/UPDATE/DELETE statements on which test assertions can be executed. -func (t *Tracker) DBChanges() Snapshot { - panic("TODO") -} - -// DBContent produces a dump of the current database contents, -// as a sequence of INSERT statements on which test assertions can be executed. -func (t *Tracker) DBContent() Snapshot { - panic("TODO") -} -- cgit v1.3.1