carlos / platform Public

Clone
git clone https://amadan.net/carlos/platform

Plain git — no account needed to clone.

Download

Download this file

1package main
2
3import "testing"
4
5// Forwarding is off unless CARLOS_DB_FORWARD is exactly 1: the condition for
6// answering byte-identically to main (db region forward spec §9.2).
7func TestDBForwardIsOffUnlessSet(t *testing.T) {
8 t.Setenv("CARLOS_DB_FORWARD", "")
9 if dbForward() {
10 t.Fatal("forwarding is on with CARLOS_DB_FORWARD unset")
11 }
12 t.Setenv("CARLOS_DB_FORWARD", "1")
13 if !dbForward() {
14 t.Fatal("forwarding is off with CARLOS_DB_FORWARD=1")
15 }
16}
17