Skip to content

Commit

Permalink
Remove test_securedrop_application_apt_dependencies test
Browse files Browse the repository at this point in the history
We have much more confidence in our Debian packages now, so we don't
need to keep a duplicated list of dependencies and check that they're
installed.

This happened to be the last use of the `python_version` variable, so
remove that entirely.
  • Loading branch information
legoktm committed Oct 28, 2024
1 parent 7d42439 commit 30f2d42
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 29 deletions.
27 changes: 0 additions & 27 deletions molecule/testinfra/app-code/test_securedrop_app_code.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

securedrop_test_vars = testutils.securedrop_test_vars
testinfra_hosts = [securedrop_test_vars.app_hostname]
python_version = securedrop_test_vars.python_version


def test_apache_default_docroot_is_absent(host):
Expand All @@ -15,32 +14,6 @@ def test_apache_default_docroot_is_absent(host):
assert not host.file("/var/www/html").exists


@pytest.mark.parametrize(
"package",
[
"apache2",
"apparmor-utils",
"coreutils",
"gnupg2",
"libapache2-mod-xsendfile",
f"libpython{python_version}",
"paxctld",
"python3",
"redis-server",
"securedrop-config",
"securedrop-keyring",
"sqlite3",
],
)
def test_securedrop_application_apt_dependencies(host, package):
"""
Ensure apt dependencies required to install `securedrop-app-code`
are present. These should be pulled in automatically via apt,
due to specification in Depends in package control file.
"""
assert host.package(package).is_installed


@pytest.mark.parametrize(
"package", ["cron-apt", "haveged", "libapache2-mod-wsgi", "ntp", "ntpdate", "supervisor"]
)
Expand Down
1 change: 0 additions & 1 deletion molecule/testinfra/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ def securedrop_import_testinfra_vars(hostname, with_header=False):
hostvars["securedrop_venv_site_packages"] = hostvars["securedrop_venv_site_packages"].format(
"3.8"
)
hostvars["python_version"] = "3.8"
hostvars["apparmor_enforce_actual"] = hostvars["apparmor_enforce"]["focal"]

# If the tests are run against a production environment, check local config
Expand Down
1 change: 0 additions & 1 deletion molecule/testinfra/mon/test_ossec_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

securedrop_test_vars = testutils.securedrop_test_vars
testinfra_hosts = [securedrop_test_vars.monitor_hostname]
python_version = securedrop_test_vars.python_version


def test_ossec_connectivity(host):
Expand Down

0 comments on commit 30f2d42

Please sign in to comment.