2015-11-05 15:23:21 +00:00
|
|
|
import os
|
|
|
|
import pytest
|
2015-11-05 03:25:57 +00:00
|
|
|
from tests.helper import ExternalVersionTestCase
|
|
|
|
|
|
|
|
|
2015-11-05 15:23:21 +00:00
|
|
|
@pytest.mark.skipif("NVCHECKER_GITHUB_TOKEN" not in os.environ,
|
|
|
|
reason="requires NVCHECKER_GITHUB_TOKEN, or it fails too much")
|
2015-11-05 03:25:57 +00:00
|
|
|
class GitHubTest(ExternalVersionTestCase):
|
|
|
|
def test_github(self):
|
2016-03-14 07:20:04 +00:00
|
|
|
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo"}), "20140122.012101")
|
2015-11-05 03:25:57 +00:00
|
|
|
|
|
|
|
def test_github_latest_release(self):
|
|
|
|
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_latest_release": 1}), "release3")
|
|
|
|
|
|
|
|
def test_github_max_tag(self):
|
|
|
|
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_max_tag": 1}), "second_release")
|
2015-12-23 13:02:06 +00:00
|
|
|
|
|
|
|
def test_github_max_tag_with_ignored_tags(self):
|
|
|
|
self.assertEqual(self.sync_get_version("example", {"github": "harry-sanabria/ReleaseTestRepo", "use_max_tag": 1, "ignored_tags": "second_release release3"}), "first_release")
|