Compare commits

...

2 Commits

Author SHA1 Message Date
James Mills 51c2543bea
Add version tests 2 days ago
James Mills 2082174ed2
Fix doctor output 2 days ago
  1. 4
      internal/doctor.go
  2. 3
      tests/testdata/version.ct

@ -20,6 +20,7 @@ func Doctor(cmd *cobra.Command, args []string) error {
fmt.Fprintf(os.Stderr, "❌\n")
return fmt.Errorf("unable to fix cgroups: %w", err)
}
fmt.Fprintf(os.Stderr, "✅\n")
} else {
fmt.Fprintf(os.Stderr, "✅\n")
}
@ -32,6 +33,7 @@ func Doctor(cmd *cobra.Command, args []string) error {
fmt.Fprintf(os.Stderr, "❌\n")
return fmt.Errorf("unable to fix network: %w", err)
}
fmt.Fprintf(os.Stderr, "✅\n")
} else {
fmt.Fprintf(os.Stderr, "✅\n")
}
@ -44,6 +46,7 @@ func Doctor(cmd *cobra.Command, args []string) error {
fmt.Fprintf(os.Stderr, "❌\n")
return fmt.Errorf("unable to fix nat: %w", err)
}
fmt.Fprintf(os.Stderr, "✅\n")
} else {
fmt.Fprintf(os.Stderr, "✅\n")
}
@ -56,6 +59,7 @@ func Doctor(cmd *cobra.Command, args []string) error {
fmt.Fprintf(os.Stderr, "❌\n")
return fmt.Errorf("unable to fix ipam: %w", err)
}
fmt.Fprintf(os.Stderr, "✅\n")
} else {
fmt.Fprintf(os.Stderr, "✅\n")
}

@ -0,0 +1,3 @@
# Test the version command
$ box version
box v0.0.10@99339eb
Loading…
Cancel
Save