Repository: freedomofpress/securedrop

Issue:
Delete setup.cfg
`setup.cfg` was used to set configuration options for `pytest` in the past, but since `pytest.ini` is now providing that configuration, it seems like `setup.cfg` should be deleted.


Discussion:

Resolving patch:
diff --git a/testinfra/conftest.py b/testinfra/conftest.py
--- a/testinfra/conftest.py
+++ b/testinfra/conftest.py
@@ -25,11 +25,6 @@ def securedrop_import_testinfra_vars(hostname, with_header=False):
     filepath = os.path.join(os.path.dirname(__file__), "vars", hostname+".yml")
     with open(filepath, 'r') as f:
         hostvars = yaml.safe_load(f)
-    # The directory Travis runs builds in varies by PR, so we cannot hardcode
-    # it in the YAML testvars. Read it from env var and concatenate.
-    if hostname.lower() == 'travis':
-        build_env = os.environ["TRAVIS_BUILD_DIR"]
-        hostvars['securedrop_code'] = build_env+"/securedrop"
 
     if with_header:
         hostvars = dict(securedrop_test_vars=hostvars)


Test patch:
diff --git a/testinfra/app-code/test_securedrop_app_code.py b/testinfra/app-code/test_securedrop_app_code.py
--- a/testinfra/app-code/test_securedrop_app_code.py
+++ b/testinfra/app-code/test_securedrop_app_code.py
@@ -69,16 +69,10 @@ def test_securedrop_application_test_journalist_key(File, Sudo):
         securedrop_test_vars.securedrop_code))
     with Sudo():
         assert securedrop_config.is_file
-        # travis needs the config.py file ran owned by root not sure why
-        # just saw this note in the travis.yml config
-        if hostenv == "travis":
-            assert securedrop_config.user == "root"
-            assert securedrop_config.group == "root"
-        else:
-            assert securedrop_config.user == \
-                securedrop_test_vars.securedrop_user
-            assert securedrop_config.group == \
-                securedrop_test_vars.securedrop_user
+        assert securedrop_config.user == \
+            securedrop_test_vars.securedrop_user
+        assert securedrop_config.group == \
+            securedrop_test_vars.securedrop_user
         assert oct(securedrop_config.mode) == "0600"
         assert securedrop_config.contains(
             "^JOURNALIST_KEY = '65A1B5FF195B56353CC63DFFCC40EF1228271441'$")
diff --git a/testinfra/common/test_user_config.py b/testinfra/common/test_user_config.py
--- a/testinfra/common/test_user_config.py
+++ b/testinfra/common/test_user_config.py
@@ -1,5 +1,4 @@
 import os
-import pytest
 import re
 
 hostenv = os.environ['SECUREDROP_TESTINFRA_TARGET_HOST']
@@ -65,8 +64,6 @@ def test_tmux_installed(Package):
     assert Package("tmux").is_installed
 
 
-@pytest.mark.skipif(hostenv == 'travis',
-                    reason="Bashrc tests dont make sense on Travis")
 def test_sudoers_tmux_env_deprecated(File):
     """
     Previous version of the Ansible config set the tmux config
diff --git a/testinfra/development/test_xvfb.py b/testinfra/development/test_xvfb.py
--- a/testinfra/development/test_xvfb.py
+++ b/testinfra/development/test_xvfb.py
@@ -1,6 +1,3 @@
-import os
-
-
 def test_xvfb_is_installed(Package):
     """
     Ensure apt requirements for Xvfb are present.
@@ -13,17 +10,13 @@ def test_firefox_is_installed(Package, Command):
     The app test suite requires a very specific version of Firefox, for
     compatibility with Selenium. Make sure to check the explicit
     version of Firefox, not just that any version of Firefox is installed.
-
-    In Travis, the Firefox installation is handled via the travis.yml
-    file, and so it won't show as installed via dpkg.
     """
-    if "TRAVIS" not in os.environ:
-        p = Package("firefox")
-        assert p.is_installed
+    p = Package("firefox")
+    assert p.is_installed
 
     c = Command("firefox --version")
     # Reminder: the rstrip is only necessary for local-context actions,
-    # e.g. in Travis, but it's a fine practice in all contexts.
+    # but it's a fine practice in all contexts.
     assert c.stdout.rstrip() == "Mozilla Firefox 46.0.1"