Changeset - 4495b75e5782
[Not reviewed]
default
0 3 0
Branko Majic (branko) - 8 years ago 2018-02-07 00:55:35
branko@majic.rs
Grafted from: 72cf8ab299dd
tests: cleanup of definition of test constants - we don't care about keeping vcs self-contained
3 files changed with 23 insertions and 34 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/base.py
Show inline comments
 
@@ -88,23 +88,25 @@ GIT_TEST_REVISION = u"7ab37bc680b4aa72c3
 
SCM_TESTS = ['hg', 'git']
 
uniq_suffix = str(int(time.mktime(datetime.datetime.now().timetuple())))
 

	
 
GIT_REMOTE_REPO = 'git://github.com/codeinn/vcs.git'
 
GIT_REMOTE_REPO = os.path.join(TESTS_TMP_PATH, GIT_REPO)
 

	
 
TEST_GIT_REPO = os.path.join(TESTS_TMP_PATH, GIT_REPO)
 
TEST_GIT_REPO_CLONE = os.path.join(TESTS_TMP_PATH, 'vcsgitclone%s' % uniq_suffix)
 
TEST_GIT_REPO_PULL = os.path.join(TESTS_TMP_PATH, 'vcsgitpull%s' % uniq_suffix)
 
TEST_GIT_REPO_CLONE = os.path.join(TESTS_TMP_PATH, 'vcs-git-clone-%s' % uniq_suffix)
 
TEST_GIT_REPO_PULL = os.path.join(TESTS_TMP_PATH, 'vcs-git-pull-%s' % uniq_suffix)
 

	
 

	
 
HG_REMOTE_REPO = 'http://bitbucket.org/marcinkuzminski/vcs'
 
HG_REMOTE_REPO = os.path.join(TESTS_TMP_PATH, HG_REPO)
 

	
 
TEST_HG_REPO = os.path.join(TESTS_TMP_PATH, HG_REPO)
 
TEST_HG_REPO_CLONE = os.path.join(TESTS_TMP_PATH, 'vcshgclone%s' % uniq_suffix)
 
TEST_HG_REPO_PULL = os.path.join(TESTS_TMP_PATH, 'vcshgpull%s' % uniq_suffix)
 
TEST_HG_REPO_CLONE = os.path.join(TESTS_TMP_PATH, 'vcs-hg-clone-%s' % uniq_suffix)
 
TEST_HG_REPO_PULL = os.path.join(TESTS_TMP_PATH, 'vcs-hg-pull-%s' % uniq_suffix)
 

	
 
# cached repos if any !
 
# comment out to get some other repos from bb or github
 
GIT_REMOTE_REPO = os.path.join(TESTS_TMP_PATH, GIT_REPO)
 
HG_REMOTE_REPO = os.path.join(TESTS_TMP_PATH, HG_REPO)
 
# By default, some of the tests will utilise locally available
 
# repositories stored within tar.gz archives as source for
 
# cloning. Should you wish to use some other, remote archive, simply
 
# uncomment these entries and/or update the URLs to use.
 
#
 
# GIT_REMOTE_REPO = 'git://github.com/codeinn/vcs.git'
 
# HG_REMOTE_REPO = 'http://bitbucket.org/marcinkuzminski/vcs'
 

	
 
# skip ldap tests if LDAP lib is not installed
 
ldap_lib_installed = False
kallithea/tests/vcs/__init__.py
Show inline comments
 
@@ -19,7 +19,7 @@ function at ``tests/__init__.py``.
 
.. _unittest: http://pypi.python.org/pypi/unittest
 

	
 
"""
 
from kallithea.tests.vcs.conf import *
 
from kallithea.tests.base import TEST_HG_REPO, HG_REMOTE_REPO, TEST_GIT_REPO, GIT_REMOTE_REPO
 
from kallithea.tests.vcs.utils import SCMFetcher
 

	
 
from kallithea.tests.base import *
kallithea/tests/vcs/conf.py
Show inline comments
 
@@ -2,38 +2,25 @@
 
Unit tests configuration module for vcs.
 
"""
 
import os
 
import tempfile
 
import shutil
 
import uuid
 

	
 
# Retrieve the necessary configuration options from the test base
 
# module. Some of these configuration options are subsequently
 
# consumed by the VCS test module.
 
from kallithea.tests.base import (
 
    TESTS_TMP_PATH, SCM_TESTS,
 
    TEST_HG_REPO, HG_REMOTE_REPO,
 
    TEST_GIT_REPO, GIT_REMOTE_REPO,
 
)
 

	
 
__all__ = (
 
    'TEST_HG_REPO', 'TEST_GIT_REPO', 'HG_REMOTE_REPO', 'GIT_REMOTE_REPO',
 
    'SCM_TESTS',
 
)
 

	
 
SCM_TESTS = ['hg', 'git']
 

	
 
THIS = os.path.abspath(os.path.dirname(__file__))
 

	
 
GIT_REMOTE_REPO = 'git://github.com/codeinn/vcs.git'
 

	
 
TESTS_TMP_PATH = os.environ.get('VCS_TEST_ROOT', tempfile.gettempdir())
 

	
 
TEST_GIT_REPO = os.environ.get('VCS_TEST_GIT_REPO',
 
                               os.path.join(TESTS_TMP_PATH, 'vcs-git'))
 
TEST_GIT_REPO_CLONE = os.environ.get('VCS_TEST_GIT_REPO_CLONE',
 
                                     os.path.join(TESTS_TMP_PATH, 'vcs-git-clone'))
 
TEST_GIT_REPO_PULL = os.environ.get('VCS_TEST_GIT_REPO_PULL',
 
                                    os.path.join(TESTS_TMP_PATH, 'vcs-git-pull'))
 

	
 
HG_REMOTE_REPO = 'http://bitbucket.org/marcinkuzminski/vcs'
 
TEST_HG_REPO = os.environ.get('VCS_TEST_HG_REPO',
 
                              os.path.join(TESTS_TMP_PATH, 'vcs-hg'))
 
TEST_HG_REPO_CLONE = os.environ.get('VCS_TEST_HG_REPO_CLONE',
 
                                    os.path.join(TESTS_TMP_PATH, 'vcs-hg-clone'))
 
TEST_HG_REPO_PULL = os.environ.get('VCS_TEST_HG_REPO_PULL',
 
                                   os.path.join(TESTS_TMP_PATH, 'vcs-hg-pull'))
 

	
 
TEST_REPO_PREFIX = 'vcs-test'
 

	
 

	
0 comments (0 inline, 0 general)