Changeset - 205c0ed5b628
[Not reviewed]
default
0 1 0
domruf - 8 years ago 2018-03-15 19:56:37
dominikruf@gmail.com
tests: set EMAIL on git commit

If git user email is not set yet, git requires the EMAIL environment variable
to be set. If it wasn't set in the test environment, test_add_submodule would
fail with something like:

fatal: unable to auto-detect email address
1 file changed with 1 insertions and 1 deletions:
0 comments (0 inline, 0 general)
kallithea/tests/other/test_vcs_operations.py
Show inline comments
 
@@ -653,25 +653,25 @@ class TestVCSOperations(TestController):
 
        assert stdout == ''
 
        assert stderr == ''
 

	
 
    def test_add_submodule(self, webserver, testfork):
 
        dest_dir = _get_tmp_dir()
 
        clone_url = webserver.repo_url(GIT_REPO)
 

	
 
        fork_url = webserver.repo_url(testfork['git'])
 

	
 
        # add submodule
 
        stdout, stderr = Command(TESTS_TMP_PATH).execute('git clone', fork_url, dest_dir)
 
        stdout, stderr = Command(dest_dir).execute('git submodule add', clone_url, 'testsubmodule')
 
        stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"')
 
        stdout, stderr = Command(dest_dir).execute('git commit -am "added testsubmodule pointing to', clone_url, '"', EMAIL=TEST_USER_ADMIN_EMAIL)
 
        stdout, stderr = Command(dest_dir).execute('git push', fork_url, 'master')
 

	
 
        # check for testsubmodule link in files page
 
        self.log_user()
 
        response = self.app.get(url(controller='files', action='index',
 
                                    repo_name=testfork['git'],
 
                                    revision='tip',
 
                                    f_path='/'))
 
        response.mustcontain('<a class="submodule-dir" href="%s" target="_blank"><i class="icon-file-submodule"></i><span>testsubmodule @ ' % clone_url)
 

	
 
        # check that following a submodule link actually works - and redirects
 
        response = self.app.get(url(controller='files', action='index',
0 comments (0 inline, 0 general)