-
Notifications
You must be signed in to change notification settings - Fork 696
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
Allow viewing of Tor browser functional test over VNC #3721
Conversation
This prevents the accidental commit of private information.
The 'when' conditional detecting a grsec kernel, used for running the paxctl commands on the TBB binary, was needlessly duplicated on the relevant task. Fortunately that didn't cause breakage, because the 'when' lines were identical, but only one was active.
Now installs Firefox 52 ESR, rather than Firefox 46, for use inside the test container. Includes changes to run-test shell script: TOR_FORCE_NET_CONFIG=0 is required to directly connect to Tor network, otherwise it will wait for userinput to either connect or to configure The `run_xvfb` invocation is no longer necessary, since the test suite code bootstraps the headless server now.
Bootstrapping the application services within the functional test suite. Includes some cleanup, culling unused debugging code, and also cleans up the various print statements. Ignore functional test firefox logs (thanks, @msheiny!) Adds retries for tor network connection failure, using the pre-existing logic.
The version of torsocks in the Trusty repos isn't recent enough to support custom ports. Rather than install from other sources, which requires manual package verification (or configuring non-trusty repos, which could break other packages), let's fall back to good ol' nc.
We need to create a new firefox profile to test the orbot specific warning. This works for both locally and over Tor.
Now we can safely execute the account changes in the tests running on the Tor browser. The logic update makes sure to create different user for this test than any other test.
This directory no longer exists with modern molecule versions and the ephemeral directory is now something like /tmp/molecule/${git_dir}/${scenario_dir}
Adds --staging flag create-dev-data.py for tests
Tor functional test auto generation of instance_information.json
In #3697, we removed the application testing pip dependencies. This commit updates the testinfra test variables accordingly.
This is temporary until grsec kernels are run in CI
One of these was introduced in #3672, but not discovered due to other CI failures (e.g. python not found when running the lint job)
Fix CI lint and staging jobs on tbb-0.9.0
I'm hoping this shakes out some really weird test failures we were seeing only under CircleCI only under the functional testing branch at a certain point in time. Really wild behavior. *fingers crossed*
Use absolute pathing in i18n testing
oh i need a rebase here.. hold on |
Basically installed this because it can be used with pyvirtualdisplay as a backend AND because it brings in the Xvnc tooling which will start an X11 server as well as a VNC server.
Had to remove x11 display logic inside test scaffolding (initially tried to integrate it there but it kept building and destroying the VNC server per test). Made a VNC helper command with support for GNOME desktop and macOS (havent tested it on mac yet). Updated the docs
10 seconds is way too short.. 160 seconds.. maybe too long? Fingers crossed I can work with the team to get the wait_for logic running
Typically these actions were done manually but lets get our good old friend ansible to run them for us (at least under the upgrade env).
ummmmmm i have no idea why that admin test is failing... waiting until the rest finish to restart but it passes locally with no probs |
Codecov Report
@@ Coverage Diff @@
## tbb-0.9.0 #3721 +/- ##
==========================================
Coverage 85.16% 85.16%
==========================================
Files 41 41
Lines 2643 2643
Branches 287 287
==========================================
Hits 2251 2251
Misses 329 329
Partials 63 63 Continue to review full report at Codecov.
|
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.
Worked nicely in my machine. Thank you @msheiny 👍
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.
one comment inline from the macOS-based SecureDrop developer community
# Find our securedrop docker ip | ||
SD_DOCKER_IP="$(docker inspect -f '{{range .NetworkSettings.Networks}}{{.IPAddress}}{{end}}' securedrop-dev)" | ||
|
||
# Quit if the VNC port not found |
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.
Hmm, I don't think this will work for macOS users that are using Docker for Mac, as per-container IP addressing is apparently not implemented (discovered this when debugging why this wasn't working for me on my mac). That said, in the spirit of not blocking people on Linux working on the functional tests, unless I am incorrect about the above, I propose we do the following and merge this:
- Add logic above this line that if
$(uname -s)" == "Darwin"
, explains that the VNC access will not work on macOS andexit 1
(snipping out the mac logic on lines 24-25) - Add a note to the developer docs here explaining how to run the functional tests on Linux (basically copypasta the PR testing instructions)
Let me know what you think!
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.
hey @redshiftzero - Yeah, I agree but I don't want this to be another feature that doesn't have Mac support. 👎 Let me see if I can tweak some things real quick
Got VNC working with functional tests on OS X by:
So it's absolutely possible for OS X, if you're ok with publishing the ports from the securedrop-dev container. |
superseded by #3817 |
Status
Ready for review
Description of Changes
Fixes #3718
Changes proposed in this pull request:
x11vnc
+Xvfb
)Testing
How should the reviewer test this PR?
If you want to test against a remote server:
upgrade
scenario - fill out theinstance_information.json
and do the create_dev dancecd securedrop ; ./bin/dev-shell ./bin/run-test tests/functional
make func-vnc
)Of special note is that I did
NOT
run this under macOS yet so I'll need anyone withmacOS
cough cough @redshiftzero cough to take a look and make sure thatmake func-vnc
call worksChecklist