Fix Dolt backend init/daemon/doctor; prevent accidental SQLite artifacts; add integration tests; clean up lint (#1218)
* /{cmd,internal}: get dolt backend init working and allow issue creation
* /{website,internal,docs,cmd}: integration tests and more split backend fixes
* /{cmd,internal}: fix lint issues
* /cmd/bd/doctor/integrity.go: fix unable to query issues bug with dolt backend
* /cmd/bd/daemon.go: remove debug logging
This commit is contained in:
@@ -182,6 +182,22 @@ func TestCheckMetadataConfigValues(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
t.Run("valid dolt metadata", func(t *testing.T) {
|
||||
metadataContent := `{
|
||||
"database": "dolt",
|
||||
"jsonl_export": "issues.jsonl",
|
||||
"backend": "dolt"
|
||||
}`
|
||||
if err := os.WriteFile(filepath.Join(beadsDir, "metadata.json"), []byte(metadataContent), 0644); err != nil {
|
||||
t.Fatalf("failed to write metadata.json: %v", err)
|
||||
}
|
||||
|
||||
issues := checkMetadataConfigValues(tmpDir)
|
||||
if len(issues) > 0 {
|
||||
t.Errorf("expected no issues, got: %v", issues)
|
||||
}
|
||||
})
|
||||
|
||||
// Test with path in database field
|
||||
t.Run("path in database field", func(t *testing.T) {
|
||||
metadataContent := `{
|
||||
|
||||
Reference in New Issue
Block a user