Skip to content

Instantly share code, notes, and snippets.

@posix4e
Created March 25, 2014 20:19
Show Gist options
  • Save posix4e/9770488 to your computer and use it in GitHub Desktop.
Save posix4e/9770488 to your computer and use it in GitHub Desktop.
To make sure everything works, try running the app:
$ vagrant ssh
$ cd /vagrant/securedrop
$ python source.py &
$ python journalist.py &
Now you can visit the site at 127.0.0.1:{8080,8081} in your browser.
To re-run tests:
cd /vagrant/securedrop
./test.sh
The following SSH command responded with a non-zero exit status.
Vagrant assumes that this means the command failed!
chmod +x /tmp/vagrant-shell && /tmp/vagrant-shell
posix4e@posix4e-B85H3-M:~/projects/securedrop$ vagrant ssh
cd /vagrWelcome to Ubuntu 12.04 LTS (GNU/Linux 3.2.0-23-generic x86_64)
* Documentation: https://help.ubuntu.com/
Welcome to your Vagrant-built virtual machine.
Last login: Fri Sep 14 06:23:18 2012 from 10.0.2.2
cd /vagranvagrant@precise64:~$ cd /vagrant/securedrop/
vagrant@precise64:/vagrant/securedrop$ ./test.sh
test_delete_collection (tests.unit_tests.TestIntegration)
Test the "delete collection" button on each collection page ... ok
test_delete_collections (tests.unit_tests.TestIntegration)
Test the "delete selected" checkboxes on the index page that can be ... ok
test_reply_normal (tests.unit_tests.TestIntegration) ... ok
test_reply_unicode (tests.unit_tests.TestIntegration) ... ok
test_submit_file (tests.unit_tests.TestIntegration)
When a source creates an account, test that a new entry appears in the journalist interface ... ok
test_submit_message (tests.unit_tests.TestIntegration)
When a source creates an account, test that a new entry appears in the journalist interface ... ok
test_bulk_download (tests.unit_tests.TestJournalist) ... ok
test_index (tests.unit_tests.TestJournalist) ... ok
test_create (tests.unit_tests.TestSource) ... ok
test_generate (tests.unit_tests.TestSource) ... ok
test_index (tests.unit_tests.TestSource)
Test that the landing page loads and looks how we expect ... ok
test_login_and_logout (tests.unit_tests.TestSource) ... ok
test_lookup (tests.unit_tests.TestSource)
Test various elements on the /lookup page ... ok
test_regenerate_invalid_lengths (tests.unit_tests.TestSource)
If the codename length is invalid, it should return 403 Forbidden ... ok
test_regenerate_valid_lengths (tests.unit_tests.TestSource)
Make sure we can regenerate all valid length codenames ... ok
test_submit_both (tests.unit_tests.TestSource) ... ok
test_submit_clean_file (tests.unit_tests.TestSource) ... ok
test_submit_dirty_file_to_be_cleaned (tests.unit_tests.TestSource) ... ok
test_submit_dirty_file_to_not_clean (tests.unit_tests.TestSource) ... ok
test_submit_file (tests.unit_tests.TestSource) ... ok
test_submit_message (tests.unit_tests.TestSource) ... ok
test_submit_sanitizes_filename (tests.unit_tests.TestSource)
Test that upload file name is sanitized ... ok
test_tor2web_warning (tests.unit_tests.TestSource) ... ok
test_get_zip (tests.unit_tests.TestStore) ... ok
test_verify (tests.unit_tests.TestStore) ... ok
----------------------------------------------------------------------
Ran 25 tests in 5.434s
OK
test_submit_and_retrieve_happy_path (tests.functional.submit_and_retrieve_message.SubmitAndRetrieveMessage) ... ok
----------------------------------------------------------------------
Ran 1 test in 2.081s
OK
test_submit_and_retrieve_happy_path (tests.functional.submit_and_retrieve_file.SubmitAndRetrieveFile) ... ERROR
======================================================================
ERROR: test_submit_and_retrieve_happy_path (tests.functional.submit_and_retrieve_file.SubmitAndRetrieveFile)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/functional/submit_and_retrieve_file.py", line 44, in test_submit_and_retrieve_happy_path
self._source_submits_a_file()
File "tests/functional/submit_and_retrieve_file.py", line 33, in _source_submits_a_file
submit_button.click()
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 59, in click
self._execute(Command.CLICK_ELEMENT)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webelement.py", line 369, in _execute
return self._parent.execute(command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/webdriver.py", line 162, in execute
response = self.command_executor.execute(driver_command, params)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 349, in execute
return self._request(url, method=command_info[0], data=data)
File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/remote/remote_connection.py", line 410, in _request
resp = opener.open(request)
File "/usr/lib/python2.7/urllib2.py", line 400, in open
response = self._open(req, data)
File "/usr/lib/python2.7/urllib2.py", line 418, in _open
'_open', req)
File "/usr/lib/python2.7/urllib2.py", line 378, in _call_chain
result = func(*args)
File "/usr/lib/python2.7/urllib2.py", line 1207, in http_open
return self.do_open(httplib.HTTPConnection, req)
File "/usr/lib/python2.7/urllib2.py", line 1180, in do_open
r = h.getresponse(buffering=True)
File "/usr/lib/python2.7/httplib.py", line 1030, in getresponse
response.begin()
File "/usr/lib/python2.7/httplib.py", line 407, in begin
version, status, reason = self._read_status()
File "/usr/lib/python2.7/httplib.py", line 371, in _read_status
raise BadStatusLine(line)
BadStatusLine: ''
----------------------------------------------------------------------
Ran 1 test in 1.504s
FAILED (errors=1)
vagrant@precise64:/vagrant/securedrop$
Below contains a broken build
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment