Skip to content

Commit

Permalink
unittest: default_rev_in_remote
Browse files Browse the repository at this point in the history
New check test to make sure a default revision defined in the remote
instead of the default element is properly handled

Signed-off-by: David Rozé <[email protected]>
  • Loading branch information
david-baylibre committed Feb 28, 2024
1 parent 1c91dc5 commit 1ab849a
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions repo_resource/test_check.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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))
Expand Down

0 comments on commit 1ab849a

Please sign in to comment.