Roboelectric test failing with error java.lang.IllegalArgumentException: INTERNET permission.

After I integrated segment sdk into my Android app, all of my roboelectric test cases started failing with the following exception

java.lang.IllegalArgumentException: INTERNET permission is required.

I can see in the Builder class that Segment throws IllegalArgumentException when Internet permission is not granted but while the Roboelectric tests run, the Internet permission is not available because of which my tests are failing. How to fix this?

8replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular