diff options
author | Lars Wirzenius <liw@liw.fi> | 2024-01-10 15:49:41 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2024-01-10 17:38:05 +0200 |
commit | a99dec50075b63d3b6d5fc0af82979be7a589814 (patch) | |
tree | a6223a971450cdce641ba779b81453ec63872c8d | |
parent | ca657dbf9add107e7a456a1d8ddc54a6c1792300 (diff) | |
download | radicle-native-ci-a99dec50075b63d3b6d5fc0af82979be7a589814.tar.gz |
tests: config file missing
Signed-off-by: Lars Wirzenius <liw@liw.fi>
-rwxr-xr-x | test-suite | 21 |
1 files changed, 21 insertions, 0 deletions
@@ -114,6 +114,27 @@ class Suite: assert len(resps) == 0 assert "RADICLE_NATIVE_CI" in stderr + def test_config_missing(self): + git = Git(os.path.join(self.tmp, "config-missing")) + git.init() + git.write("README.md", "README") + native = NativeYaml("echo hello world") + debug(f"native.yaml: {native.yaml()}") + git.write(".radicle/native.yaml", native.yaml()) + git.commit("first commit") + commit = git.head() + self.rad.init(git) + rid = self.rad.rid(git) + trigger = Trigger(rid, commit) + cfg2 = Config("no-config-file") + ci = NativeCI(self.rad, cfg2) + exit, resps, stderr = ci.run(trigger) + debug(f"exit: {exit}") + debug(f"responses: {resps}") + assert exit != 0 + assert len(resps) == 0 + assert "no-config-file" in stderr + def test_command_fails(self): exit, resps, stderr = self._test_case("cmd-fails", "false") assert exit != 0 |