Keep SQL-server defaults and explicit backup overrides covered in every build. Move only the two embedded auto-detection cases into a CGO-tagged companion so non-CGO runs no longer assert an unavailable storage mode. Agent-Signature: codex-tui-gpt-5.6-sol-ultra on behalf of Ewen Cuthiell
24 lines
569 B
Go
24 lines
569 B
Go
//go:build cgo
|
|
|
|
package main
|
|
|
|
import "testing"
|
|
|
|
func TestConfigGetBackupEnabled_EffectiveValue_Embedded(t *testing.T) {
|
|
runConfigGetBackupEnabledEffectiveValueCases(t, []backupEnabledEffectiveValueCase{
|
|
{
|
|
name: "unset + no remote → off (no git remote)",
|
|
envVal: "\x00",
|
|
hasRemote: false,
|
|
wantPrefix: "false ",
|
|
wantContains: "no git remote",
|
|
},
|
|
{
|
|
name: "unset + remote → on (git remote)",
|
|
envVal: "\x00",
|
|
hasRemote: true,
|
|
wantPrefix: "true ",
|
|
wantContains: "git remote detected",
|
|
},
|
|
})
|
|
}
|