summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2024-01-10 16:06:08 +0200
committerLars Wirzenius <liw@liw.fi>2024-01-10 17:38:05 +0200
commit161a3635b4813e009bddafa9db13b3d48d1b70a2 (patch)
treee4f2da1b6287e3a6a33b749192ef956b029c3138
parent5336bf8195015a4d5d804444123e78fdb436d240 (diff)
downloadradicle-native-ci-161a3635b4813e009bddafa9db13b3d48d1b70a2.tar.gz
refactor: use _get_repo_info
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-xtest-suite8
1 files changed, 2 insertions, 6 deletions
diff --git a/test-suite b/test-suite
index 11be6f9..138f2f5 100755
--- a/test-suite
+++ b/test-suite
@@ -104,9 +104,7 @@ class Suite:
def test_without_config_env_var(self):
git = self._create_git_repo("no-config")
self._create_valid_native_yaml(git, "echo hello world")
- commit = git.head()
- self.rad.init(git)
- rid = self.rad.rid(git)
+ rid, commit = self._get_repo_info(git)
trigger = Trigger(rid, commit)
ci = NativeCI(self.rad, self.config)
ci.without_config()
@@ -120,9 +118,7 @@ class Suite:
def test_config_missing(self):
git = self._create_git_repo("config-missing")
self._create_valid_native_yaml(git, "echo hello world")
- commit = git.head()
- self.rad.init(git)
- rid = self.rad.rid(git)
+ rid, commit = self._get_repo_info(git)
trigger = Trigger(rid, commit)
cfg2 = Config("no-config-file")
ci = NativeCI(self.rad, cfg2)