mirror of
https://github.com/priyanshujain/sanderling.git
synced 2026-10-02 11:07:10 +00:00
test(testrun): cover physical-iOS rejection
This commit is contained in:
1 parent
19e1c26f04
commit
927e20820d
1 file changed
+28
@@ -0,0 +1,28 @@
|
|||||||
|
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)
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in new issue
Block a user