aboutsummaryrefslogtreecommitdiff
path: root/infra/repo_manager_test.py
diff options
context:
space:
mode:
authorjonathanmetzman <31354670+jonathanmetzman@users.noreply.github.com>2020-12-18 10:44:12 -0800
committerGitHub <noreply@github.com>2020-12-18 10:44:12 -0800
commitd8546a88b380a6e1d6f86a486bf7acea97723486 (patch)
tree9451da17af4a4b3a009ad8231abb8b5bfe3c14d3 /infra/repo_manager_test.py
parentc2165341d2ccf09a50e239b3e2902b4c4426d088 (diff)
downloadoss-fuzz-d8546a88b380a6e1d6f86a486bf7acea97723486.tar.gz
[infra] Mark more tests as integration (#4869)
Diffstat (limited to 'infra/repo_manager_test.py')
-rw-r--r--infra/repo_manager_test.py16
1 files changed, 13 insertions, 3 deletions
diff --git a/infra/repo_manager_test.py b/infra/repo_manager_test.py
index 653a21718..36a773cc6 100644
--- a/infra/repo_manager_test.py
+++ b/infra/repo_manager_test.py
@@ -37,11 +37,13 @@ def get_oss_fuzz_repo():
yield os.path.join(tmp_dir, repo_name)
-class CloneIntegrationTest(unittest.TestCase):
+class CloneTest(unittest.TestCase):
"""Tests the _clone function."""
- def test_clone_valid_repo(self):
- """Tests the correct location of the git repo."""
+ @unittest.skipIf(not os.getenv('INTEGRATION_TESTS'),
+ 'INTEGRATION_TESTS=1 not set')
+ def test_clone_valid_repo_integration(self):
+ """Integration test that tests the correct location of the git repo."""
with get_oss_fuzz_repo() as oss_fuzz_repo:
git_path = os.path.join(oss_fuzz_repo, '.git')
self.assertTrue(os.path.isdir(git_path))
@@ -54,6 +56,8 @@ class CloneIntegrationTest(unittest.TestCase):
'oss-fuzz')
+@unittest.skipIf(not os.getenv('INTEGRATION_TESTS'),
+ 'INTEGRATION_TESTS=1 not set')
class RepoManagerCheckoutTest(unittest.TestCase):
"""Tests the checkout functionality of RepoManager."""
@@ -77,6 +81,8 @@ class RepoManagerCheckoutTest(unittest.TestCase):
repo_man.checkout_commit('not-a-valid-commit')
+@unittest.skipIf(not os.getenv('INTEGRATION_TESTS'),
+ 'INTEGRATION_TESTS=1 not set')
class RepoManagerGetCommitListTest(unittest.TestCase):
"""Tests the get_commit_list method of RepoManager."""
@@ -110,6 +116,8 @@ class RepoManagerGetCommitListTest(unittest.TestCase):
repo_man.get_commit_list(old_commit, new_commit) # pylint: disable=arguments-out-of-order
+@unittest.skipIf(not os.getenv('INTEGRATION_TESTS'),
+ 'INTEGRATION_TESTS=1 not set')
class GitDiffTest(unittest.TestCase):
"""Tests get_git_diff."""
@@ -149,6 +157,8 @@ class GitDiffTest(unittest.TestCase):
self.assertIsNone(diff)
+@unittest.skipIf(not os.getenv('INTEGRATION_TESTS'),
+ 'INTEGRATION_TESTS=1 not set')
class CheckoutPrIntegrationTest(unittest.TestCase):
"""Does Integration tests on the checkout_pr method of RepoManager."""