Skip to content

Commit ae1825e

Browse files
committed
add test for change
1 parent c94ca86 commit ae1825e

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

tests/cli/test_cli.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1966,6 +1966,11 @@ def test_search_time(ctx):
19661966
check_equals('', _run_command([cl, 'search', 'name=' + name, '.before=' + time1, '-u']))
19671967
check_equals('', _run_command([cl, 'search', 'name=' + name, '.after=' + time3, '-u']))
19681968

1969+
# Search param non-ISO time test, should not throw "Unable to parse datetime" error.
1970+
MONTH_FIRST_CHAR_IDX = 5
1971+
nonIsoTime = time1[:MONTH_FIRST_CHAR_IDX] + time1[MONTH_FIRST_CHAR_IDX+1:]
1972+
check_equals('', _run_command([cl, 'search', 'name=' + name, '.before=' + nonIsoTime, '-u']))
1973+
19691974
# Before
19701975
check_equals(
19711976
uuid1, _run_command([cl, 'search', 'name=' + name, '.before=' + time2, 'id=.sort', '-u'])

0 commit comments

Comments
 (0)