diff --git a/repo_resource/test_check.py b/repo_resource/test_check.py index 51e50d8..706c6fd 100644 --- a/repo_resource/test_check.py +++ b/repo_resource/test_check.py @@ -38,6 +38,13 @@ def setUp(self): 'name': 'aosp_device_fixed.xml' } } + self.default_rev_in_remote = { + 'source': { + 'url': 'https://github.com/makohoek/demo-manifests.git', + 'revision': 'main', + 'name': 'default_rev_in_remote.xml' + } + } self.demo_ssh_manifests_source = { 'source': { 'url': 'https://github.com/makohoek/demo-manifests.git', @@ -100,6 +107,11 @@ def test_unknown_manifest_name(self): with self.assertRaises(SystemExit): check.check(instream) + def test_default_rev_in_remote(self): + data = self.default_rev_in_remote + instream = StringIO(json.dumps(data)) + check.check(instream) + def test_branch_defaults_to_HEAD(self): no_revision_data = self.demo_manifests_source_norev instream = StringIO(json.dumps(no_revision_data))