Skip to content

test(init): add build_config test for postgres backend path #2378

@bug-ops

Description

@bug-ops

Context

src/init.rs build_config() gained a postgres branch in Phase 3: when state.database_url is Some(_), it skips the sqlite_path prompt and sets MemoryConfig::database_url. This path has no build_config unit test.

Acceptance Criteria

  • Test that when WizardState { database_url: Some("".to_owned()), .. } is passed to build_config(), the resulting Config::memory.database_url is Some(_)
  • Test that sqlite_path falls back to the serde default (not an empty string) in that case
  • Test that when database_url is None, the existing sqlite path behavior is unchanged

Notes

WizardState derives Clone under #[cfg_attr(test, derive(Clone))] and has Default impl — test setup is straightforward.

Metadata

Metadata

Assignees

Labels

P2High value, medium complexitytestingTests and quality

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions