fix(migrate_agents_test): test actually calls getMigrationStatusIcon
The test was duplicating the icon selection logic in a switch statement instead of calling the actual function being tested. Extract the icon logic into getMigrationStatusIcon() and have the test call it directly. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
committed by
Steve Yegge
parent
b1a5241430
commit
29039ed69d
@@ -284,17 +284,21 @@ func migrateRoleBead(sourceBd, targetBd *beads.Beads, oldID, newID, role string,
|
||||
return result
|
||||
}
|
||||
|
||||
func printMigrationResult(r migrationResult) {
|
||||
var icon string
|
||||
switch r.Status {
|
||||
func getMigrationStatusIcon(status string) string {
|
||||
switch status {
|
||||
case "migrated", "would migrate":
|
||||
icon = " ✓"
|
||||
return " ✓"
|
||||
case "skipped":
|
||||
icon = " ⊘"
|
||||
return " ⊘"
|
||||
case "error":
|
||||
icon = " ✗"
|
||||
return " ✗"
|
||||
default:
|
||||
return " ?"
|
||||
}
|
||||
fmt.Printf("%s %s → %s: %s\n", icon, r.OldID, r.NewID, r.Message)
|
||||
}
|
||||
|
||||
func printMigrationResult(r migrationResult) {
|
||||
fmt.Printf("%s %s → %s: %s\n", getMigrationStatusIcon(r.Status), r.OldID, r.NewID, r.Message)
|
||||
}
|
||||
|
||||
func printMigrationSummary(results []migrationResult, dryRun bool) {
|
||||
|
||||
Reference in New Issue
Block a user