You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
408 lines
9.8 KiB
408 lines
9.8 KiB
---
|
|
test case: Invalid period ''
|
|
in:
|
|
param: :now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period 'h'
|
|
in:
|
|
param: h:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '1'
|
|
in:
|
|
param: 1:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '1H'
|
|
in:
|
|
param: 1H:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '0h'
|
|
in:
|
|
param: 0h:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '12345678901234567890h'
|
|
in:
|
|
param: 12345678901234567890h:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Valid period '1h'
|
|
in:
|
|
param: 1h:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 23:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Invalid period shift '/h'
|
|
in:
|
|
param: 1h:/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period shift 'now-1'
|
|
in:
|
|
param: 1h:now-1
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period shift 'now/h - 1'
|
|
in:
|
|
param: 1h:now/h - 1
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period shift 'now/h-1'
|
|
in:
|
|
param: 1h:now/h-1
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period shift 'now/h - 1h'
|
|
in:
|
|
param: 1h:now/h - 1h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period shift 'now/m-1m'
|
|
in:
|
|
param: 1h:now/m-1m
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Valid parameters '1h,now/h-1h'
|
|
in:
|
|
param: 1h:now/h-1h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 22:00:00.000000000 +03:00
|
|
end: 2020-08-31 22:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h,now/d'
|
|
in:
|
|
param: 1h:now/d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 23:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h,now/h' from 2020-09-01 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1h:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-09-01 09:00:00.000000000 +03:00
|
|
end: 2020-09-01 09:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h,now/d' from 2020-09-01 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1h:now/d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 23:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h,now/h-1d' from 2020-09-01 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1h:now/h-1d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 09:00:00.000000000 +03:00
|
|
end: 2020-08-31 09:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1d,now/w-6d' from 2020-09-01 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1d:now/w-6d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-24 00:00:00.000000000 +03:00
|
|
end: 2020-08-24 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1d,now/M-1M+6d/w+1d' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1d:now/M-1M+6d/w+1d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-03 00:00:00.000000000 +03:00
|
|
end: 2020-08-03 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1w,now/M' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1w:now/M
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-25 00:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1M,now/M' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/M
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-01 00:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1M,now/M-1M' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/M-1M
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-07-01 00:00:00.000000000 +03:00
|
|
end: 2020-07-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1M,now/M-2M' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/M-2M
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-06-01 00:00:00.000000000 +03:00
|
|
end: 2020-06-30 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1d,now/y' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1d:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2019-12-31 00:00:00.000000000 +02:00
|
|
end: 2019-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h,now-1d' from 2020-09-01 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1h:now-1d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 09:00:00.000000000 +03:00
|
|
end: 2020-08-31 09:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '3h,now-1d/h' from 2020-09-01 10:30:00.000000000 +03:00
|
|
in:
|
|
param: 3h:now-1d/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:30:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 07:00:00.000000000 +03:00
|
|
end: 2020-08-31 09:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '3h,now+1d-3d/w' from 2020-09-01 10:30:00.000000000 +03:00
|
|
in:
|
|
param: 3h:now+1d-3d/w
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 10:30:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-23 21:00:00.000000000 +03:00
|
|
end: 2020-08-23 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Invalid parameters '1M,now/h' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid parameters '1M,now/d' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid parameters '1M,now/w' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/w
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid parameters '1M,now/M-1h' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/M-1h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid parameters '1M,now/M-1d' from 2020-09-18 10:00:00.000000000 +03:00
|
|
in:
|
|
param: 1M:now/M-1d
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-18 10:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Valid period '1y'
|
|
in:
|
|
param: 1y:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2019-01-01 00:00:00.000000000 +02:00
|
|
end: 2019-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid period '12M'
|
|
in:
|
|
param: 12M:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2019-01-01 00:00:00.000000000 +02:00
|
|
end: 2019-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid period '366d'
|
|
in:
|
|
param: 366d:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2021-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-01-01 00:00:00.000000000 +02:00
|
|
end: 2020-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid period '8784h'
|
|
in:
|
|
param: 8784h:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2021-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-01-01 00:00:00.000000000 +02:00
|
|
end: 2020-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Invalid period '2y'
|
|
in:
|
|
param: 2y:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '13M'
|
|
in:
|
|
param: 13M:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '367d'
|
|
in:
|
|
param: 367d:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid period '8785h'
|
|
in:
|
|
param: 8785h:now/y
|
|
timezone: :Europe/Riga
|
|
time: 2021-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Invalid shift '26y'
|
|
in:
|
|
param: 1h:now/y-26y
|
|
timezone: :Europe/Riga
|
|
time: 2021-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
return: FAIL
|
|
---
|
|
test case: Valid shift '25y'
|
|
in:
|
|
param: 1h:now/y-25y
|
|
timezone: :Europe/Riga
|
|
time: 2021-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 1995-12-31 23:00:00.000000000 +02:00
|
|
end: 1995-12-31 23:00:00.000000000 +02:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid parameters '1h:now/M+6d/w+1h' from 2020-09-23 00:59:46.000000000 +03:00
|
|
in:
|
|
param: 1h:now/M+6d/w+1h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-23 00:59:46.000000000 +03:00
|
|
out:
|
|
start: 2020-09-07 00:00:00.000000000 +03:00
|
|
end: 2020-09-07 00:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
---
|
|
test case: Valid shift '0h'
|
|
in:
|
|
param: 1h:now-0h
|
|
timezone: :Europe/Riga
|
|
time: 2020-09-01 00:00:00.000000000 +03:00
|
|
out:
|
|
start: 2020-08-31 23:00:00.000000000 +03:00
|
|
end: 2020-08-31 23:00:00.000000000 +03:00
|
|
return: SUCCEED
|
|
...
|