Add leak test for when VPN settings change#7439
Conversation
Rawa
left a comment
There was a problem hiding this comment.
Reviewed 9 of 11 files at r1.
Reviewable status: 9 of 11 files reviewed, 5 unresolved discussions (waiting on @Pururun)
android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/page/DaitaSettingsPage.kt line 13 at r1 (raw file):
} fun clickEnableSwitch() {
nit: EnableSwitch might disable since it is a Switch. Maybe we should call it clickDaitaSwitch or something similar?
android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt line 61 at r1 (raw file):
fun enableLocalNetworkSharing() { on<TopBar> { clickSettings() }
TopBar isn't really a screen, don't we expect this to be the ConnectPage? Maybe this should rather be part of the ConnectScreen? than the app, or some new concept. E.g if not logged in TopBar would not be able to go to VpnSettingsPage since it is hidden.
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 169 at r1 (raw file):
app.launch() disableObfuscation() disablePostQuantum()
Don't we have a clean slate with these off? Or is it not clean?
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 182 at r1 (raw file):
// Capture generated traffic to a specific host val targetIpAddress = BuildConfig.TRAFFIC_GENERATION_IP_ADDRESS
Before starting capture and generating traffic we should ensure we are connected. Otherwise we might send traffic outside the tunnel, and thus failing the test incorrectly.
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 192 at r1 (raw file):
enableDAITA() enableShadowsocks()
Maybe should assert that we are connected after changing the settings?
Rawa
left a comment
There was a problem hiding this comment.
Reviewed 2 of 11 files at r1, all commit messages.
Reviewable status: all files reviewed, 5 unresolved discussions (waiting on @Pururun)
Rawa
left a comment
There was a problem hiding this comment.
Reviewable status: all files reviewed, 4 unresolved discussions (waiting on @Pururun)
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 169 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
Don't we have a clean slate with these off? Or is it not clean?
Edit: Clarify with comment that this is to disable automatic mode.
77aecf3 to
7b6a39b
Compare
niklasberglund
left a comment
There was a problem hiding this comment.
Reviewable status: 6 of 16 files reviewed, 4 unresolved discussions (waiting on @Rawa)
android/test/common/src/main/kotlin/net/mullvad/mullvadvpn/test/common/interactor/AppInteractor.kt line 61 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
TopBar isn't really a screen, don't we expect this to be the
ConnectPage? Maybe this should rather be part of the ConnectScreen? than the app, or some new concept. E.g if not logged inTopBarwould not be able to go to VpnSettingsPage since it is hidden.
Moved the functions from TopBar to LoginPage and ConnectPage and removed TopBar
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 169 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
Edit: Clarify with comment that this is to disable automatic mode.
See added comment
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 182 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
Before starting capture and generating traffic we should ensure we are connected. Otherwise we might send traffic outside the tunnel, and thus failing the test incorrectly.
Good catch, this was accidentally removed. Have added it.
android/test/e2e/src/main/kotlin/net/mullvad/mullvadvpn/test/e2e/LeakTest.kt line 192 at r1 (raw file):
Previously, Rawa (David Göransson) wrote…
Maybe should assert that we are connected after changing the settings?
Yes that's a very good idea 👍 Now waiting for connected label.
Rawa
left a comment
There was a problem hiding this comment.
Reviewed 10 of 10 files at r2, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
7b6a39b to
988db3a
Compare
988db3a to
dd3ee95
Compare
Rawa
left a comment
There was a problem hiding this comment.
Reviewed 12 of 12 files at r3, all commit messages.
Reviewable status:complete! all files reviewed, all discussions resolved
Test for leaks to specific host when changing DAITA and Shadowsocks VPN settings. To test the changes out run
testLeakWhenVpnSettingsChangelocallyor run the Android - build and test workflow in GitHub.This change is