mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 19:17:10 +00:00
* refactor(sidecar): drop IosDriverBackend * refactor(sidecar): route ios platform off the iOS backend * chore(sidecar): remove maestro ios dependencies * feat(testrun): reject physical iOS with a clear message * refactor(sidecar): drop iOS hierarchy helpers and their test * build(sidecar): strip iOS runner bundles and classes from the fat jar * test(testrun): cover physical-iOS rejection
29 lines
665 B
Go
29 lines
665 B
Go
package testrun
|
|
|
|
import (
|
|
"context"
|
|
"io"
|
|
"os/exec"
|
|
"strings"
|
|
"testing"
|
|
)
|
|
|
|
func TestBuildDriverRejectsPhysicalIOS(t *testing.T) {
|
|
if _, err := exec.LookPath("xcrun"); err != nil {
|
|
t.Skip("xcrun not on PATH; physical-iOS rejection is reached only after preflight")
|
|
}
|
|
options := Options{Platform: "ios"}
|
|
options.iosIsSimulator = false
|
|
|
|
_, cleanup, err := buildDriver(context.Background(), options, io.Discard)
|
|
if cleanup != nil {
|
|
cleanup()
|
|
}
|
|
if err == nil {
|
|
t.Fatal("expected physical-device iOS to be rejected")
|
|
}
|
|
if !strings.Contains(err.Error(), "not yet supported") {
|
|
t.Fatalf("expected an unsupported-physical-iOS error, got %v", err)
|
|
}
|
|
}
|