Changed testdata directory names and TwoVhost80Test to a better fitting one

This commit is contained in:
Joona Hoikkala
2016-03-20 21:57:52 +02:00
parent 302cac92ad
commit bbbfe80b94
39 changed files with 13 additions and 13 deletions
@@ -20,7 +20,7 @@ class AugeasConfiguratorTest(util.ApacheTest):
self.config_path, self.vhost_path, self.config_dir, self.work_dir) self.config_path, self.vhost_path, self.config_dir, self.work_dir)
self.vh_truth = util.get_vh_truth( self.vh_truth = util.get_vh_truth(
self.temp_dir, "debian_apache_2_4/two_vhost_80") self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def tearDown(self): def tearDown(self):
shutil.rmtree(self.config_dir) shutil.rmtree(self.config_dir)
@@ -20,17 +20,17 @@ from letsencrypt_apache import obj
from letsencrypt_apache.tests import util from letsencrypt_apache.tests import util
class TwoVhost80Test(util.ApacheTest): class MultipleVhostsTest(util.ApacheTest):
"""Test two standard well-configured HTTP vhosts.""" """Test two standard well-configured HTTP vhosts."""
def setUp(self): # pylint: disable=arguments-differ def setUp(self): # pylint: disable=arguments-differ
super(TwoVhost80Test, self).setUp() super(MultipleVhostsTest, self).setUp()
self.config = util.get_apache_configurator( self.config = util.get_apache_configurator(
self.config_path, self.vhost_path, self.config_dir, self.work_dir) self.config_path, self.vhost_path, self.config_dir, self.work_dir)
self.config = self.mock_deploy_cert(self.config) self.config = self.mock_deploy_cert(self.config)
self.vh_truth = util.get_vh_truth( self.vh_truth = util.get_vh_truth(
self.temp_dir, "debian_apache_2_4/two_vhost_80") self.temp_dir, "debian_apache_2_4/multiple_vhosts")
def mock_deploy_cert(self, config): def mock_deploy_cert(self, config):
"""A test for a mock deploy cert""" """A test for a mock deploy cert"""
@@ -20,7 +20,7 @@ class SelectVhostTest(unittest.TestCase):
zope.component.provideUtility(display_util.FileDisplay(sys.stdout)) zope.component.provideUtility(display_util.FileDisplay(sys.stdout))
self.base_dir = "/example_path" self.base_dir = "/example_path"
self.vhosts = util.get_vh_truth( self.vhosts = util.get_vh_truth(
self.base_dir, "debian_apache_2_4/two_vhost_80") self.base_dir, "debian_apache_2_4/multiple_vhosts")
@classmethod @classmethod
def _call(cls, vhosts): def _call(cls, vhosts):
@@ -193,7 +193,7 @@ class ParserInitTest(util.ApacheTest):
"update_runtime_variables"): "update_runtime_variables"):
path = os.path.join( path = os.path.join(
self.temp_dir, self.temp_dir,
"debian_apache_2_4/////two_vhost_80/../two_vhost_80/apache2") "debian_apache_2_4/////multiple_vhosts/../multiple_vhosts/apache2")
parser = ApacheParser(self.aug, path, parser = ApacheParser(self.aug, path,
"/dummy/vhostpath") "/dummy/vhostpath")
@@ -22,9 +22,9 @@ from letsencrypt_apache import obj
class ApacheTest(unittest.TestCase): # pylint: disable=too-few-public-methods class ApacheTest(unittest.TestCase): # pylint: disable=too-few-public-methods
def setUp(self, test_dir="debian_apache_2_4/two_vhost_80", def setUp(self, test_dir="debian_apache_2_4/multiple_vhosts",
config_root="debian_apache_2_4/two_vhost_80/apache2", config_root="debian_apache_2_4/multiple_vhosts/apache2",
vhost_root="debian_apache_2_4/two_vhost_80/apache2/sites-available"): vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"):
# pylint: disable=arguments-differ # pylint: disable=arguments-differ
super(ApacheTest, self).setUp() super(ApacheTest, self).setUp()
@@ -59,9 +59,9 @@ class ApacheTest(unittest.TestCase): # pylint: disable=too-few-public-methods
class ParserTest(ApacheTest): # pytlint: disable=too-few-public-methods class ParserTest(ApacheTest): # pytlint: disable=too-few-public-methods
def setUp(self, test_dir="debian_apache_2_4/two_vhost_80", def setUp(self, test_dir="debian_apache_2_4/multiple_vhosts",
config_root="debian_apache_2_4/two_vhost_80/apache2", config_root="debian_apache_2_4/multiple_vhosts/apache2",
vhost_root="debian_apache_2_4/two_vhost_80/apache2/sites-available"): vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"):
super(ParserTest, self).setUp(test_dir, config_root, vhost_root) super(ParserTest, self).setUp(test_dir, config_root, vhost_root)
zope.component.provideUtility(display_util.FileDisplay(sys.stdout)) zope.component.provideUtility(display_util.FileDisplay(sys.stdout))
@@ -116,7 +116,7 @@ def get_apache_configurator(
def get_vh_truth(temp_dir, config_name): def get_vh_truth(temp_dir, config_name):
"""Return the ground truth for the specified directory.""" """Return the ground truth for the specified directory."""
if config_name == "debian_apache_2_4/two_vhost_80": if config_name == "debian_apache_2_4/multiple_vhosts":
prefix = os.path.join( prefix = os.path.join(
temp_dir, config_name, "apache2/sites-available") temp_dir, config_name, "apache2/sites-available")
aug_pre = "/files" + prefix aug_pre = "/files" + prefix