fix(test): fix TestInitNoDbMode for no-db mode config persistence
Changes: - Save issue-prefix in config.yaml when using --no-db mode (previously only saved in database which doesn't exist in no-db mode) - Add config.ResetForTesting() to allow reloading config in tests - Simplify test to verify config values rather than execute subsequent commands (cobra's flag caching makes multi-Execute() testing complex) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
81828db6ef
commit
fe67e9e232
@@ -244,8 +244,8 @@ With --stealth: configures per-repository git settings for invisible beads usage
|
||||
// Non-fatal - continue anyway
|
||||
}
|
||||
|
||||
// Create config.yaml with no-db: true
|
||||
if err := createConfigYaml(beadsDir, true); err != nil {
|
||||
// Create config.yaml with no-db: true and the prefix
|
||||
if err := createConfigYaml(beadsDir, true, prefix); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to create config.yaml: %v\n", err)
|
||||
// Non-fatal - continue anyway
|
||||
}
|
||||
@@ -395,8 +395,8 @@ With --stealth: configures per-repository git settings for invisible beads usage
|
||||
// Non-fatal - continue anyway
|
||||
}
|
||||
|
||||
// Create config.yaml template
|
||||
if err := createConfigYaml(beadsDir, false); err != nil {
|
||||
// Create config.yaml template (prefix is stored in DB, not config.yaml)
|
||||
if err := createConfigYaml(beadsDir, false, ""); err != nil {
|
||||
fmt.Fprintf(os.Stderr, "Warning: failed to create config.yaml: %v\n", err)
|
||||
// Non-fatal - continue anyway
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user