mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-05 04:27:09 +00:00
fix(testrun): point the device java preflight hint at the ios-device doctor
This commit is contained in:
1 parent
bbab168b8e
commit
a203302b00
2 files changed
+24
-2
No files matched your search
@@ -101,6 +101,22 @@ func TestPreflightDevice_NonIosIsNoop(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
func TestPreflightDevice_JavaFailurePointsAtIosDeviceDoctor(t *testing.T) {
|
||||
check := func(name string) error {
|
||||
if name == "java" {
|
||||
return errors.New("java not found")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
err := runPreflightDevice("ios", check)
|
||||
if err == nil || !strings.Contains(err.Error(), "java") {
|
||||
t.Fatalf("expected java error, got %v", err)
|
||||
}
|
||||
if !strings.Contains(err.Error(), "sanderling doctor --platform=ios-device") {
|
||||
t.Errorf("hint must name the ios-device doctor platform: %v", err)
|
||||
}
|
||||
}
|
||||
|
||||
func TestPreflight_UnknownPlatform(t *testing.T) {
|
||||
check := func(string) error { return nil }
|
||||
if err := runPreflight(context.Background(), "fuchsia", check); err == nil {
|
||||
|
||||
Reference in new issue
Block a user