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

3678 remove apptest browser installs #3697

Merged
Show file tree
Hide file tree
Changes from all 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
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
docker:
- image: gcr.io/cloud-builders/docker
steps:
- run: apt-get install -y make
- run: apt-get install -y make python
- checkout
- run:
name: Rebase on-top of github target
Expand Down
21 changes: 0 additions & 21 deletions install_files/ansible-base/roles/app-test/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,3 @@ securedrop_app_test_apparmor_complain: False
# Source Interface config to enable logging in the staging environment.
apache_user: www-data

# Additional apt packages required for running the application tests.
test_apt_dependencies:
- xvfb

# Additional Python dependencies required for running the application tests.
test_pip_requirements: "{{ securedrop_code }}/requirements/test-requirements.txt"

# Specify TBB version to download and install
tbb_release: 7.5.6
tbb_locale: en-US
tbb_arch: 64
tbb_directory: "/home/{{ ansible_user|default(ansible_ssh_user|default(lookup('env', 'USER'))) }}/.local/tbb"
tbb_signing_key: EF6E286DDA85EA2A4BA7DE684E2C6E8793298290
keyserver: "hkp://ipv4.pool.sks-keyservers.net"
tbb_apt_dependencies:
- libasound2
- libdbus-glib-1-2
- libfontconfig1
- libgtk2.0-0
- libxrender1

This file was deleted.

This file was deleted.

74 changes: 0 additions & 74 deletions install_files/ansible-base/roles/app-test/tasks/install_tbb.yml

This file was deleted.

7 changes: 0 additions & 7 deletions install_files/ansible-base/roles/app-test/tasks/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,5 @@
tags:
- aa-complain

- include: dev_setup_xvfb_for_functional_tests.yml

- include: setup_firefox_for_selenium.yml

- include: disable_mprotect_ff_plugin_container.yml

- include: modern_gettext.yml

- include: install_tbb.yml

This file was deleted.

7 changes: 3 additions & 4 deletions securedrop/tests/functional/functional_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
import time
import json
import traceback
import subprocess
import shutil
import requests

Expand Down Expand Up @@ -202,7 +201,6 @@ def init_gpg(self):
gpg.import_keys(open(keyfile).read())
return gpg


def setup(self, session_expiration=30):

self.localtesting = False
Expand Down Expand Up @@ -268,7 +266,8 @@ def setup(self, session_expiration=30):
# This user is required for our tests cases to login
self.admin_user = {
"name": "journalist",
"password": "correct horse battery staple profanity oil chewy",
"password": ("correct horse battery staple"
" profanity oil chewy"),
"secret": "JHCOGO7VCER3EJ4L"}
self.admin_user['totp'] = pyotp.TOTP(self.admin_user['secret'])
self.sleep_time = 2
Expand Down Expand Up @@ -319,7 +318,7 @@ def start_journalist_server(app):
self.driver = self._create_webdriver()
else:
# We will use a normal firefox esr for the pages-layout tests
self.driver = self._create_webdriver2(self.new_profile) # pylint: disable=no-member # noqa
self.driver = self._create_webdriver2(self.new_profile) # noqa # pylint: disable=no-member
self._javascript_toggle()

# Polls the DOM to wait for elements. To read more about why
Expand Down
11 changes: 5 additions & 6 deletions securedrop/tests/functional/journalist_navigation_steps.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import pytest
import json
import re
import tempfile
import gzip
Expand All @@ -8,7 +7,7 @@
import random
import requests

from os.path import abspath, realpath, dirname, join
from os.path import dirname

from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.keys import Keys
Expand Down Expand Up @@ -55,9 +54,9 @@ def return_downloaded_content(self, url, cookies):
proxies = None
if ".onion" in url:
proxies = {
'http': 'socks5h://127.0.0.1:9150',
'https': 'socks5h://127.0.0.1:9150'
}
'http': 'socks5h://127.0.0.1:9150',
'https': 'socks5h://127.0.0.1:9150'
}
r = requests.get(url, cookies=cookies, proxies=proxies, stream=True)
if r.status_code != 200:
raise Exception("Failed to download the data.")
Expand Down Expand Up @@ -641,7 +640,7 @@ def _journalist_downloads_message(self):

# Downloading files with Selenium is tricky because it cannot automate
# the browser's file download dialog. We can directly request the file
# using requests, but we need to pass the cookies for the logged in user
# using requests, but we need to pass the cookies for logged in user
# for Flask to allow this.
def cookie_string_from_selenium_cookies(cookies):
result = {}
Expand Down
Loading