diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2023-11-15 13:50:15 +0100 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2023-11-15 14:03:11 +0100 |
commit | 992ac5301fc8727d83017b242af2df9895eebfcc (patch) | |
tree | 4fdd21a61b54d368540d6ef65258f97473051381 /test | |
parent | client: print the server response (diff) | |
download | cimple-992ac5301fc8727d83017b242af2df9895eebfcc.tar.gz cimple-992ac5301fc8727d83017b242af2df9895eebfcc.zip |
implement a command to list runs
Diffstat (limited to '')
-rw-r--r-- | test/py/test_repo.py | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/py/test_repo.py b/test/py/test_repo.py index e500b9f..e5845fe 100644 --- a/test/py/test_repo.py +++ b/test/py/test_repo.py @@ -3,6 +3,7 @@ # For details, see https://github.com/egor-tensin/cimple. # Distributed under the MIT License. +import json import logging import multiprocessing as mp import re @@ -71,6 +72,19 @@ def _test_repo_internal(env, repo, numof_processes, runs_per_process): assert repo.run_exit_code_matches(ec), f"Exit code doesn't match: {ec}" assert repo.run_output_matches(output), f"Output doesn't match: {output}" + runs = env.client.run('get-runs') + runs = json.loads(runs)['result'] + assert len(runs) == numof_runs + + for run in runs: + id = run['id'] + ec = run['exit_code'] + + assert repo.run_exit_code_matches(ec), f"Exit code doesn't match: {ec}" + # Not implemented yet: + assert 'status' not in run + assert 'output' not in run + @my_parametrize('runs_per_client', [1, 5]) @my_parametrize('numof_clients', [1, 5]) |