From 161a3635b4813e009bddafa9db13b3d48d1b70a2 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Wed, 10 Jan 2024 16:06:08 +0200 Subject: [PATCH] refactor: use _get_repo_info Signed-off-by: Lars Wirzenius --- test-suite | 8 ++------ 1 file 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)