mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Fixed tests: added the missed types of interval (WEEK, MONTH, QUARTER, YEAR) to CREATE/ALTER QUOTA statements.
This commit is contained in:
parent
679c2c0a7a
commit
a45a85f9e5
@ -1985,9 +1985,9 @@ a period of time over for which the quota SHALL apply using the
|
||||
`FOR INTERVAL` clause in the `CREATE QUOTA` statement.
|
||||
|
||||
This statement SHALL also support a number and a time period which will be one
|
||||
of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:
|
||||
of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:
|
||||
|
||||
`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some real number
|
||||
`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some real number
|
||||
to define the interval.
|
||||
|
||||
|
||||
@ -1999,9 +1999,9 @@ a period of time over for which the quota SHALL apply using the
|
||||
`FOR RANDOMIZED INTERVAL` clause in the `CREATE QUOTA` statement.
|
||||
|
||||
This statement SHALL also support a number and a time period which will be one
|
||||
of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:
|
||||
of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:
|
||||
|
||||
`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some
|
||||
`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some
|
||||
real number to define the interval.
|
||||
|
||||
##### RQ.SRS-006.RBAC.Quota.Create.Queries
|
||||
@ -2107,7 +2107,7 @@ version: 1.0
|
||||
```sql
|
||||
CREATE QUOTA [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_name]
|
||||
[KEYED BY {'none' | 'user name' | 'ip address' | 'client key' | 'client key or user name' | 'client key or ip address'}]
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}
|
||||
{MAX { {QUERIES | ERRORS | RESULT ROWS | RESULT BYTES | READ ROWS | READ BYTES | EXECUTION TIME} = number } [,...] |
|
||||
NO LIMITS | TRACKING ONLY} [,...]]
|
||||
[TO {role [,...] | ALL | ALL EXCEPT role [,...]}]
|
||||
@ -2146,9 +2146,9 @@ a period of time over for which the quota SHALL apply using the
|
||||
`FOR INTERVAL` clause in the `ALTER QUOTA` statement.
|
||||
|
||||
This statement SHALL also support a number and a time period which will be one
|
||||
of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:
|
||||
of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:
|
||||
|
||||
`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some real number
|
||||
`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some real number
|
||||
to define the interval.
|
||||
|
||||
##### RQ.SRS-006.RBAC.Quota.Alter.Interval.Randomized
|
||||
@ -2159,9 +2159,9 @@ a period of time over for which the quota SHALL apply using the
|
||||
`FOR RANDOMIZED INTERVAL` clause in the `ALTER QUOTA` statement.
|
||||
|
||||
This statement SHALL also support a number and a time period which will be one
|
||||
of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:
|
||||
of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:
|
||||
|
||||
`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some
|
||||
`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some
|
||||
real number to define the interval.
|
||||
|
||||
##### RQ.SRS-006.RBAC.Quota.Alter.Queries
|
||||
|
@ -3333,9 +3333,9 @@ RQ_SRS_006_RBAC_Quota_Create_Interval = Requirement(
|
||||
'`FOR INTERVAL` clause in the `CREATE QUOTA` statement.\n'
|
||||
'\n'
|
||||
'This statement SHALL also support a number and a time period which will be one\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:\n'
|
||||
'\n'
|
||||
'`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some real number\n'
|
||||
'`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some real number\n'
|
||||
'to define the interval.\n'
|
||||
),
|
||||
link=None
|
||||
@ -3354,9 +3354,9 @@ RQ_SRS_006_RBAC_Quota_Create_Interval_Randomized = Requirement(
|
||||
'`FOR RANDOMIZED INTERVAL` clause in the `CREATE QUOTA` statement.\n'
|
||||
'\n'
|
||||
'This statement SHALL also support a number and a time period which will be one\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:\n'
|
||||
'\n'
|
||||
'`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some\n'
|
||||
'`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some\n'
|
||||
'real number to define the interval.\n'
|
||||
),
|
||||
link=None
|
||||
@ -3590,7 +3590,7 @@ RQ_SRS_006_RBAC_Quota_Create_Syntax = Requirement(
|
||||
'```sql\n'
|
||||
'CREATE QUOTA [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_name]\n'
|
||||
" [KEYED BY {'none' | 'user name' | 'ip address' | 'client key' | 'client key or user name' | 'client key or ip address'}]\n"
|
||||
' [FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}\n'
|
||||
' [FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}\n'
|
||||
' {MAX { {QUERIES | ERRORS | RESULT ROWS | RESULT BYTES | READ ROWS | READ BYTES | EXECUTION TIME} = number } [,...] |\n'
|
||||
' NO LIMITS | TRACKING ONLY} [,...]]\n'
|
||||
' [TO {role [,...] | ALL | ALL EXCEPT role [,...]}]\n'
|
||||
@ -3669,9 +3669,9 @@ RQ_SRS_006_RBAC_Quota_Alter_Interval = Requirement(
|
||||
'`FOR INTERVAL` clause in the `ALTER QUOTA` statement.\n'
|
||||
'\n'
|
||||
'This statement SHALL also support a number and a time period which will be one\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:\n'
|
||||
'\n'
|
||||
'`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some real number\n'
|
||||
'`FOR INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some real number\n'
|
||||
'to define the interval.\n'
|
||||
),
|
||||
link=None
|
||||
@ -3690,9 +3690,9 @@ RQ_SRS_006_RBAC_Quota_Alter_Interval_Randomized = Requirement(
|
||||
'`FOR RANDOMIZED INTERVAL` clause in the `ALTER QUOTA` statement.\n'
|
||||
'\n'
|
||||
'This statement SHALL also support a number and a time period which will be one\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | MONTH}`. Thus, the complete syntax SHALL be:\n'
|
||||
'of `{SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}`. Thus, the complete syntax SHALL be:\n'
|
||||
'\n'
|
||||
'`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}` where number is some\n'
|
||||
'`FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}` where number is some\n'
|
||||
'real number to define the interval.\n'
|
||||
),
|
||||
link=None
|
||||
|
@ -15,7 +15,7 @@ def feature(self, node="clickhouse1"):
|
||||
ALTER QUOTA [IF EXISTS] name [ON CLUSTER cluster_name]
|
||||
[RENAME TO new_name]
|
||||
[KEYED BY {'none' | 'user name' | 'ip address' | 'client key' | 'client key or user name' | 'client key or ip address'}]
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | MONTH}
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}
|
||||
{MAX { {QUERIES | ERRORS | RESULT ROWS | RESULT BYTES | READ ROWS | READ BYTES | EXECUTION TIME} = number } [,...] |
|
||||
NO LIMITS | TRACKING ONLY} [,...]]
|
||||
[TO {role [,...] | ALL | ALL EXCEPT role [,...]}]
|
||||
@ -93,7 +93,7 @@ def feature(self, node="clickhouse1"):
|
||||
with When("I alter quota on a randomized interval"):
|
||||
node.query("ALTER QUOTA quota0 FOR RANDOMIZED INTERVAL 1 DAY NO LIMITS")
|
||||
|
||||
intervals = ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'MONTH']
|
||||
intervals = ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']
|
||||
for i, interval in enumerate(intervals):
|
||||
with Scenario(f"I alter quota for interval {interval}", flags=TE, requirements=[
|
||||
RQ_SRS_006_RBAC_Quota_Alter_Interval("1.0")]):
|
||||
|
@ -14,7 +14,7 @@ def feature(self, node="clickhouse1"):
|
||||
```sql
|
||||
CREATE QUOTA [IF NOT EXISTS | OR REPLACE] name [ON CLUSTER cluster_name]
|
||||
[KEYED BY {'none' | 'user name' | 'ip address' | 'client key' | 'client key or user name' | 'client key or ip address'}]
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY}
|
||||
[FOR [RANDOMIZED] INTERVAL number {SECOND | MINUTE | HOUR | DAY | WEEK | MONTH | QUARTER | YEAR}
|
||||
{MAX { {QUERIES | ERRORS | RESULT ROWS | RESULT BYTES | READ ROWS | READ BYTES | EXECUTION TIME} = number } [,...] |
|
||||
NO LIMITS | TRACKING ONLY} [,...]]
|
||||
[TO {role [,...] | ALL | ALL EXCEPT role [,...]}]
|
||||
@ -107,7 +107,7 @@ def feature(self, node="clickhouse1"):
|
||||
with When("I create a quota for randomized interval"):
|
||||
node.query("CREATE QUOTA quota9 FOR RANDOMIZED INTERVAL 1 DAY NO LIMITS")
|
||||
|
||||
intervals = ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'MONTH']
|
||||
intervals = ['SECOND', 'MINUTE', 'HOUR', 'DAY', 'WEEK', 'MONTH', 'QUARTER', 'YEAR']
|
||||
for i, interval in enumerate(intervals):
|
||||
with Scenario(f"I create quota for interval {interval}", flags=TE, requirements=[
|
||||
RQ_SRS_006_RBAC_Quota_Create_Interval("1.0")]):
|
||||
|
Loading…
Reference in New Issue
Block a user