Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Moved riseup vpn to experimental suite and correct tests #625

Merged
merged 16 commits into from
Dec 5, 2023
Merged
Show file tree
Hide file tree
Changes from 15 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public static Intent newIntent(Context context, AbstractSuite testSuite) {
String experimentalLinks =
"\n\n* [STUN Reachability](https://github.com/ooni/spec/blob/master/nettests/ts-025-stun-reachability.md)" +
"\n\n* [DNS Check](https://github.com/ooni/spec/blob/master/nettests/ts-028-dnscheck.md)" +
"\n\n* [RiseupVPN](https://ooni.org/nettest/riseupvpn/)" +
"\n\n* [ECH Check](https://github.com/ooni/spec/blob/master/nettests/ts-039-echcheck.md)" +
"\n\n* [Tor Snowflake](https://ooni.org/nettest/tor-snowflake/) "+ String.format(" ( %s )",getString(R.string.Settings_TestOptions_LongRunningTest))+
"\n\n* [Vanilla Tor](https://github.com/ooni/spec/blob/master/nettests/ts-016-vanilla-tor.md) " + String.format(" ( %s )",getString(R.string.Settings_TestOptions_LongRunningTest));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ public AbstractTest[] getTestList(@Nullable PreferenceManager pm) {
if (pm == null || pm.isExperimentalOn()){
list.add(new Experimental("stunreachability"));
list.add(new Experimental("dnscheck"));
list.add(new Experimental("riseupvpn"));
list.add(new Experimental("echcheck"));
if ((pm == null || pm.isLongRunningTestsInForeground()) || getAutoRun()){
list.add(new Experimental("torsf"));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
import org.openobservatory.ooniprobe.model.jsonresult.JsonResult;
import org.openobservatory.ooniprobe.model.settings.Settings;

@Deprecated
public class RiseupVPN extends AbstractTest {
public static final String NAME = "riseupvpn";

public RiseupVPN() {
super(NAME, R.string.Test_RiseupVPN_Fullname, R.drawable.test_riseupvpn, R.string.urlTestRvpn, 15);
// NOTE: this test has been demoted to experimental and such the icon resource `R.drawable.test_riseupvpn` is not displayed anymore.
aanorbel marked this conversation as resolved.
Show resolved Hide resolved
super(NAME, R.string.Test_Experimental_Fullname, 0, R.string.urlTestRvpn, 15);
}

@Override public void run(Context c, PreferenceManager pm, AppLogger logger, Gson gson, Result result, int index, AbstractTest.TestCallback testCallback) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,15 @@ public void getTestList_experimental_on() {

List<AbstractTest> tests = Arrays.asList(suite.getTestList(pm));

assertEquals(3, tests.size());
assertEquals(4, tests.size());
assertEquals(Experimental.class, tests.get(0).getClass());
assertEquals(Experimental.class, tests.get(1).getClass());
assertEquals(Experimental.class, tests.get(2).getClass());
assertEquals(Experimental.class, tests.get(3).getClass());
assertEquals("stunreachability", tests.get(0).getName());
assertEquals("dnscheck", tests.get(1).getName());
assertEquals("echcheck", tests.get(2).getName());
assertEquals("riseupvpn", tests.get(2).getName());
assertEquals("echcheck", tests.get(3).getName());
}

@Test
Expand All @@ -50,17 +52,19 @@ public void getTestList_experimental_on_autorun_on() {

List<AbstractTest> tests = Arrays.asList(autoRunSuite.getTestList(pm));

assertEquals(5, tests.size());
assertEquals(6, tests.size());
assertEquals(Experimental.class, tests.get(0).getClass());
assertEquals(Experimental.class, tests.get(1).getClass());
assertEquals(Experimental.class, tests.get(2).getClass());
assertEquals(Experimental.class, tests.get(3).getClass());
assertEquals(Experimental.class, tests.get(4).getClass());
assertEquals(Experimental.class, tests.get(5).getClass());

assertEquals("stunreachability", tests.get(0).getName());
assertEquals("dnscheck", tests.get(1).getName());
assertEquals("echcheck", tests.get(2).getName());
assertEquals("torsf", tests.get(3).getName());
assertEquals("vanilla_tor", tests.get(4).getName());
assertEquals("riseupvpn", tests.get(2).getName());
assertEquals("echcheck", tests.get(3).getName());
assertEquals("torsf", tests.get(4).getName());
assertEquals("vanilla_tor", tests.get(5).getName());
}
}
Loading