How can I turn off my internet connection from the terminal window without using sudo?

StackOverflow https://stackoverflow.com/questions/22390132

  •  14-06-2023
  •  | 
  •  

Вопрос

From OSX, I need to do something to temporarily simulate wifi going down on my iOS device while running a test (via the Calabash framework). I can't shut off the actual wifi because Calabash needs that connection to run the tests.

I thought about blocking ports, but haven't found a non-sudo way to do this. I cannot use sudo because the tests have to run in the lab without human interaction. I know a common workaround is you can add the user to the wheel group, but in doing so it reduces the security of the machine that does it. I'd really like to avoid introducing security issues.

Это было полезно?

Решение

According to one of the creators of Calabash: https://groups.google.com/forum/#!topic/calabash-ios/jkoN2ztJ9QI So it's possible, just not very easy

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top