diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-01-10 16:30:10 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-01-10 17:38:05 +0200 |
commit | 2cfafb8075bc829b4065e6059c9f9dd81a4662f4 (patch) | |
tree | 509b1b291cf02b9731b1cad2b762cb4e00fdcedf | |
parent | 1dad8cb66fbbc3c9aeb9d7092f5eadc796a2bcb3 (diff) | |
download | radicle-native-ci-2cfafb8075bc829b4065e6059c9f9dd81a4662f4.tar.gz |
tests: commit is missing
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-x | test-suite | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -156,6 +156,22 @@ class Suite: assert "clone" in error assert rid[len("rad:") :] in error + def test_commit_does_not_exist(self): + git = self._create_git_repo("commit-missing") + self._create_valid_native_yaml(git, "echo hello world") + rid, _commit = self._get_repo_info(git) + commit = "0000000000000000000000000000000000000000" + trigger = Trigger(rid, commit) + ci = self._create_ci() + exit, resps, stderr = ci.run(trigger) + + assert exit != 0 + assert len(resps) == 2 + self.assert_triggered(resps[0]) + self.assert_error(resps[1]) + error = resps[1]["result"]["error"] + assert commit in error + def test_native_yaml_has_no_shell(self): exit, resps, stderr = self._test_case("no-shell", None) assert exit != 0 |