aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2017-04-25 22:49:59 +0200
committerGuido Günther <agx@sigxcpu.org>2017-04-25 22:57:35 +0200
commit02e15e36fd19257870890723cad82707136e49b4 (patch)
tree51c7b7c58012d658144204dc676b49a8747e2b11
parent1113c9590ca2847f586441e857e3f17698a35020 (diff)
tests: Move env check from clone to import_dsc
since this is the tested script Gbp-Dch: Ignore
-rw-r--r--tests/component/deb/test_clone.py14
-rw-r--r--tests/component/deb/test_import_dsc.py14
2 files changed, 14 insertions, 14 deletions
diff --git a/tests/component/deb/test_clone.py b/tests/component/deb/test_clone.py
index 8bc05bf..91e0cd1 100644
--- a/tests/component/deb/test_clone.py
+++ b/tests/component/deb/test_clone.py
@@ -56,20 +56,6 @@ class TestClone(ComponentTestBase):
assert len(cloned.get_commits()) == 1
self.check_hook_vars('postclone', ["GBP_GIT_DIR"])
- def test_clone_environ(self):
- """Test that environment variables influence git configuration"""
- # Build up somethng we can clone from
- os.environ['DEBFULLNAME'] = 'testing tester'
- os.environ['DEBEMAIL'] = 'gbp-tester@debian.invalid'
- repo = RepoFixtures.import_native()
- got = repo.get_config("user.email")
- want = os.environ['DEBEMAIL']
- ok_(got == want, "unexpected git config user.email: got %s, want %s" % (got, want))
-
- got = repo.get_config("user.name")
- want = os.environ['DEBFULLNAME']
- ok_(got == want, "unexpected git config user.name: got %s, want %s" % (got, want))
-
@skipUnless(os.getenv("GBP_NETWORK_TESTS"), "network tests disabled")
def test_clone_vcsgit(self):
"""Test that cloning from vcs-git urls works"""
diff --git a/tests/component/deb/test_import_dsc.py b/tests/component/deb/test_import_dsc.py
index da4849e..e892cea 100644
--- a/tests/component/deb/test_import_dsc.py
+++ b/tests/component/deb/test_import_dsc.py
@@ -22,6 +22,7 @@ from tests.component import (ComponentTestBase,
ComponentTestGitRepository,
skipUnless)
from tests.component.deb import DEB_TEST_DATA_DIR, DEB_TEST_DOWNLOAD_URL
+from tests.component.deb.fixtures import RepoFixtures
from nose.tools import ok_, eq_
@@ -259,3 +260,16 @@ class TestImportDsc(ComponentTestBase):
ok_("hello-debhelper (2.8-1) unstable; urgency=low" in commitmsg)
ok_("ello-debhelper (2.7-1) unstable; urgency=low" in commitmsg)
ok_("hello-debhelper (2.6-2) unstable; urgency=medium" not in commitmsg)
+
+ def test_import_environ(self):
+ """Test that environment variables influence git configuration"""
+ os.environ['DEBFULLNAME'] = 'testing tester'
+ os.environ['DEBEMAIL'] = 'gbp-tester@debian.invalid'
+ repo = RepoFixtures.import_native()
+ got = repo.get_config("user.email")
+ want = os.environ['DEBEMAIL']
+ ok_(got == want, "unexpected git config user.email: got %s, want %s" % (got, want))
+
+ got = repo.get_config("user.name")
+ want = os.environ['DEBFULLNAME']
+ ok_(got == want, "unexpected git config user.name: got %s, want %s" % (got, want))