package main import "testing" // Forwarding is off unless CARLOS_DB_FORWARD is exactly 1: the condition for // answering byte-identically to main (db region forward spec ยง9.2). func TestDBForwardIsOffUnlessSet(t *testing.T) { t.Setenv("CARLOS_DB_FORWARD", "") if dbForward() { t.Fatal("forwarding is on with CARLOS_DB_FORWARD unset") } t.Setenv("CARLOS_DB_FORWARD", "1") if !dbForward() { t.Fatal("forwarding is off with CARLOS_DB_FORWARD=1") } }