-
Notifications
You must be signed in to change notification settings - Fork 349
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
Implement packet capture client and models #6317
Implement packet capture client and models #6317
Conversation
c49e7a7
to
96952e6
Compare
96952e6
to
cf113e0
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a second attachment to test runs - JSON data. Maybe not something that should be kept later but it's very useful during development to inspect the data tests can see, rather than only inspecting the PCAP file which shows all traffic.
Reviewable status: 0 of 10 files reviewed, all discussions resolved
2c2b408
to
233fbfb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 10 of 10 files at r1.
Reviewable status: 8 of 10 files reviewed, all discussions resolved
233fbfb
to
01f98a5
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 7 of 10 files reviewed, 1 unresolved discussion (waiting on @acb-mv)
ios/MullvadVPNUITests/Networking/Networking.swift
line 53 at r3 (raw file):
// Check if interface is en0 which is the WiFi connection on the iPhone let name = String(cString: interfacePointer.pointee.ifa_name) if name.hasPrefix("en") {
Fix for one of the Mullvad iPhones using network interface en2
instead of en0
. I was under the impression all iPhones and iOS versions use en0
for the wifi network interface, but turned out other en
interfaces can be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it sometimes fails to retrieve file, perhaps there is some problem with IO which needs to be tested more.
Reviewable status: 7 of 10 files reviewed, 1 unresolved discussion (waiting on @acb-mv)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewable status: 7 of 10 files reviewed, 1 unresolved discussion (waiting on @acb-mv)
01f98a5
to
557635d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 2 files at r2, 1 of 1 files at r3, 2 of 2 files at r4, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion
927294b
to
89ea598
Compare
89ea598
to
89e9074
Compare
Code in this PR is part of #6449 which will replace this PR |
This PR adds support for packet capture in end to end tests. In
BaseUITestCase
there are the functionsstartPacketCapture()
andstopPacketCapture()
for tests to use for starting and stopping packet capture sessions. The PCAP file for a packet capture session will be attached to the test run in teardown.Created
testLeaks
inLeakTests
as an example of how to do packet capture. The test is just there as an example right now and is not analysing the captured traffic yet.To test the changes in this PR out you will need to copy the latest
UITests.xcconfig.template
file or add this to yourUITests.xcconfig
file:Also note that tests are now running on staging environment, so you need to connfigure staging accounts for
NO_TIME_ACCOUNT_NUMBER
andHAS_TIME_ACCOUNT_NUMBER
in yourUITests.xcconfig
.Try out the changes by running
testLeaks
. You must be on theapp-team-ios-tests
WiFi. After running the test you should find a PCAP file for the test run in the test report under tear down.This change is