beads/cmd/bd/config_get_backup_enabled_embedded_test.go
ecuthiell 84da9d36a2
test(backup): split embedded effective-value cases (#4946) (#4947)
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
2026-07-23 18:25:16 -07:00

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",
},
})
}