Help us shape the future of Go! Take the 2026 Go Developer Survey

testdb

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

Package testdb, testler için gerçek bir PostgreSQL örneği sağlar.

NEDEN GERÇEK VERİTABANI: postern'in tek motoru PostgreSQL. Sahte bir katmana ya da başka bir motora karşı test etmek, YANLIŞ ŞEYİ test etmek olurdu — bu paketin kurulma sebebi olan hataların çoğu (ON CONFLICT hedefi, kısıt ihlali kodları, harf duyarsız indeksler) yalnızca gerçek sunucuda ortaya çıkar.

MALİYET: testler Docker ister. Karşılığında `go test ./...` yeşil yandığında bunun bir anlamı oluyor.

YALITIM: süreç başına TEK konteyner, test başına AYRI ŞEMA. Ayrı veritabanı da olurdu ama CREATE DATABASE çok daha pahalı; şema yalıtımı aynı garantiyi ucuza veriyor.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSN

func DSN(t *testing.T) string

DSN, teste özel BOŞ bir şemaya bağlanan bağlantı dizesi döner.

Şema test bitiminde düşürülür; konteyner ayakta kalır.

Types

This section is empty.

Jump to

Keyboard shortcuts

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