summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-10 16:01:26 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-10 17:38:05 +0200
commiteecbd7084aac461ca73d895f772fb5db92985a36 (patch)
tree2e18a225852ea6fd143a1a30b01b398cbf8f8739
parentef1f1bb092df3c0016b8f27d5c7b05d1753833d9 (diff)
downloadradicle-native-ci-eecbd7084aac461ca73d895f772fb5db92985a36.tar.gz
refactor: add helper method to get repository rid and head commit
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-xtest-suite11
1 files changed, 6 insertions, 5 deletions
diff --git a/test-suite b/test-suite
index 2bbe1f7..9a82ebf 100755
--- a/test-suite
+++ b/test-suite
@@ -68,16 +68,17 @@ class Suite:
git.write(".radicle/native.yaml", native.yaml())
git.commit("add native.yaml")
- def _setup(self, repo_name, shell):
- git = self._create_git_repo(repo_name)
- self._create_valid_native_yaml(git, shell)
-
+ def _get_repo_info(self, git):
commit = git.head()
self.rad.init(git)
rid = self.rad.rid(git)
-
return rid, commit
+ def _setup(self, repo_name, shell):
+ git = self._create_git_repo(repo_name)
+ self._create_valid_native_yaml(git, shell)
+ return self._get_repo_info(git)
+
def _ci(self):
return NativeCI(self.rad, self.config)