From 992ac5301fc8727d83017b242af2df9895eebfcc Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Wed, 15 Nov 2023 13:50:15 +0100 Subject: implement a command to list runs --- test/py/test_repo.py | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'test') 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]) -- cgit v1.2.3