def setUp(self, test_dir="debian_apache_2_4/multiple_vhosts", config_root="debian_apache_2_4/multiple_vhosts/apache2", vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available"): # pylint: disable=arguments-differ super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir=test_dir, pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.os_constant("MOD_SSL_CONF_SRC"), constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, config_root) self.vhost_path = os.path.join(self.temp_dir, vhost_root) self.rsa512jwk = jose.JWKRSA.load(test_util.load_vector( "rsa512_key.pem")) # Make sure all vhosts in sites-enabled are symlinks (Python packaging # does not preserve symlinks) sites_enabled = os.path.join(self.config_path, "sites-enabled") if not os.path.exists(sites_enabled): return for vhost_basename in os.listdir(sites_enabled): vhost = os.path.join(sites_enabled, vhost_basename) if not os.path.islink(vhost): # pragma: no cover os.remove(vhost) target = os.path.join( os.path.pardir, "sites-available", vhost_basename) os.symlink(target, vhost)
def setUp( self, test_dir="debian_apache_2_4/multiple_vhosts", config_root="debian_apache_2_4/multiple_vhosts/apache2", vhost_root="debian_apache_2_4/multiple_vhosts/apache2/sites-available" ): # pylint: disable=arguments-differ super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir=test_dir, pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.os_constant("MOD_SSL_CONF_SRC"), constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, config_root) self.vhost_path = os.path.join(self.temp_dir, vhost_root) self.rsa512jwk = jose.JWKRSA.load( test_util.load_vector("rsa512_key.pem")) # Make sure all vhosts in sites-enabled are symlinks (Python packaging # does not preserve symlinks) sites_enabled = os.path.join(self.config_path, "sites-enabled") if not os.path.exists(sites_enabled): return for vhost_basename in os.listdir(sites_enabled): vhost = os.path.join(sites_enabled, vhost_basename) if not os.path.islink(vhost): # pragma: no cover os.remove(vhost) target = os.path.join(os.path.pardir, "sites-available", vhost_basename) os.symlink(target, vhost)
def setUp(self): super(NginxTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( "etc_nginx", "letsencrypt_nginx.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, "etc_nginx") self.rsa512jwk = jose.JWKRSA.load( test_util.load_vector("rsa512_key.pem"))
def setUp(self): super(NginxTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( "etc_nginx", "letsencrypt_nginx.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, "etc_nginx") self.rsa512jwk = jose.JWKRSA.load(test_util.load_vector( "rsa512_key.pem"))
def setUp(self, test_dir="debian_apache_2_4/two_vhost_80", config_root="debian_apache_2_4/two_vhost_80/apache2"): # pylint: disable=arguments-differ super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir=test_dir, pkg="letsencrypt_apache.tests" ) self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST ) self.config_path = os.path.join(self.temp_dir, config_root) self.rsa512jwk = jose.JWKRSA.load(test_util.load_vector("rsa512_key.pem"))
def setUp(self): super(NginxTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( "etc_nginx", "letsencrypt_nginx.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF) self.config_path = os.path.join(self.temp_dir, "etc_nginx") self.rsa256_file = pkg_resources.resource_filename( "acme.jose", "testdata/rsa256_key.pem") self.rsa256_pem = pkg_resources.resource_string( "acme.jose", "testdata/rsa256_key.pem")
def setUp(self): super(NginxTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( "etc_nginx", "letsencrypt_nginx.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, "etc_nginx") self.rsa256_file = pkg_resources.resource_filename( "letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem")) self.rsa256_pem = pkg_resources.resource_string( "letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))
def setUp(self, test_dir="debian_apache_2_4/two_vhost_80", config_root="debian_apache_2_4/two_vhost_80/apache2"): # pylint: disable=arguments-differ super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir=test_dir, pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, config_root) self.rsa512jwk = jose.JWKRSA.load( test_util.load_vector("rsa512_key.pem"))
def setUp(self): super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir="debian_apache_2_4/two_vhost_80", pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF) self.config_path = os.path.join( self.temp_dir, "debian_apache_2_4/two_vhost_80/apache2") self.rsa256_file = pkg_resources.resource_filename( "acme.jose", "testdata/rsa256_key.pem") self.rsa256_pem = pkg_resources.resource_string( "acme.jose", "testdata/rsa256_key.pem")
def setUp(self): super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir="debian_apache_2_4/two_vhost_80", pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join( self.temp_dir, "debian_apache_2_4/two_vhost_80/apache2") self.rsa256_file = pkg_resources.resource_filename( "acme.jose", "testdata/rsa256_key.pem") self.rsa256_pem = pkg_resources.resource_string( "acme.jose", "testdata/rsa256_key.pem")
def setUp(self, test_dir="debian_apache_2_4/two_vhost_80", config_root="debian_apache_2_4/two_vhost_80/apache2"): # pylint: disable=arguments-differ super(ApacheTest, self).setUp() self.temp_dir, self.config_dir, self.work_dir = common.dir_setup( test_dir=test_dir, pkg="letsencrypt_apache.tests") self.ssl_options = common.setup_ssl_options( self.config_dir, constants.MOD_SSL_CONF_SRC, constants.MOD_SSL_CONF_DEST) self.config_path = os.path.join(self.temp_dir, config_root) self.rsa256_file = pkg_resources.resource_filename( "letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem")) self.rsa256_pem = pkg_resources.resource_string( "letsencrypt.tests", os.path.join("testdata", "rsa256_key.pem"))