Skip to content

Commit

Permalink
Adds constraint to verify wifi, charging and vpn status
Browse files Browse the repository at this point in the history
  • Loading branch information
aanorbel committed May 4, 2024
1 parent 497f68e commit 2fd1804
Showing 1 changed file with 9 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,16 @@ public static void startRunTestServiceUnattended(Application app) {
* Application context used to start `RunTestService`.
*/
public static void startRunTestServiceNetworkChanged(Application app) {
app.getServiceComponent().inject(d);

boolean isVPNInUse = ReachabilityManager.isVPNinUse(app);

OONICheckInConfig config = app.getOONICheckInConfig();

if (!d.generateAutoRunServiceSuite.shouldStart(config.isOnWiFi(),config.isCharging(), isVPNInUse)) {
return;
}

// TODO: (aanorbel) - Enforce constraints required before tests are run.
// Tag tests with identifier required to set Settings$Options#software_name
ArrayList<AbstractSuite> testSuites = new ArrayList<>();
testSuites.add(new WebsitesSuite());
Expand Down

0 comments on commit 2fd1804

Please sign in to comment.