Commit Graph

47 Commits

Author SHA1 Message Date
Alexander Tokmakov
ec80068611 add a test for no such key 2023-09-20 22:37:24 +02:00
Alexey Milovidov
19ef25a7d2 Merge branch 'master' of github.com:ClickHouse/ClickHouse into fix-grammarly 2023-08-11 01:04:33 +02:00
pufit
2f46ae850e
Merge branch 'master' into pufit/role-from-storage 2023-08-07 17:57:41 -04:00
Alexey Milovidov
ce2fcc8f33 Fix wording 2023-08-06 14:48:20 +02:00
Alexander Tokmakov
7684e68008
Add system stop pulling replication log (#52881)
* add system stop pulling replication log

* add const

* fix another stupid test

* Update test.py
2023-08-03 13:34:43 +03:00
pufit
2a00e2aa6a Implement MOVE query for the access entities. 2023-07-20 22:20:36 -04:00
pufit
aa0f3bc994 Solve pr issues 2023-04-12 20:28:17 -04:00
pufit
078b8f5399 Small refactor, additional tests 2023-04-11 19:55:59 -04:00
pufit
a3c5acb106 Additional tests 2023-04-05 22:52:48 -04:00
robot-clickhouse
3c89d3f49d Automatic style fix 2023-04-05 01:00:27 +00:00
pufit
8441b0a3e1 Fix comments, tests, docs 2023-04-04 20:43:15 -04:00
xiedeyantu
5a18e0d5a5 support undrop table 2023-03-27 22:16:36 +08:00
kssenii
0fa3fb3592 Fix show grants for user which has all grants 2023-03-03 14:04:32 +01:00
kssenii
de81a5f92d Fix integration tests 2023-02-28 13:36:52 +01:00
kssenii
03c9eeb106 Fix tests 2023-02-27 14:29:20 +01:00
kssenii
ceff5f41d1 Fix tests 2023-02-22 12:27:07 +01:00
Kseniia Sumarokova
a5d3b00699
Merge pull request #46010 from kssenii/named-collections-fix-access
Fix named collections access
2023-02-07 23:20:22 +01:00
kssenii
022d4308ce Address review comments 2023-02-07 13:01:55 +01:00
kssenii
84ea48b555 Merge remote-tracking branch 'origin/named-collections-fix-access' into named-collections-fix-access 2023-02-04 23:32:56 +01:00
kssenii
cb4757fc43 Fix tests 2023-02-04 22:54:49 +01:00
Anton Popov
3008e701ea fix tests 2022-12-14 01:36:03 +00:00
Vitaly Baranov
2c8788266c Fix tests. 2022-06-20 03:44:49 +02:00
Vitaly Baranov
241b51c7d4
Add implicit grants with grant option too. (#38017) 2022-06-14 00:09:51 +02:00
Mikhail f. Shiryaev
e6f5a3f98b
Apply black formatter to all *.py files in the repo 2022-03-22 17:39:58 +01:00
Vitaly Baranov
e148b43a29 Privileges CREATE/ALTER/DROP ROW POLICY now can be granted on a table or on database.* as well as globally *.* 2022-02-11 12:35:52 +07:00
Vitaly Baranov
1f81e43f1e Fix checking grants for SHOW GRANTS. 2022-02-01 19:55:24 +07:00
kssenii
f26da04cdf Fix checks 2021-09-09 09:53:58 +03:00
Vitaly Baranov
178d0f9ba9 Fix checking GRANT OPTION while executing GRANT with REPLACE OPTION. 2021-08-15 16:20:05 +03:00
Vitaly Baranov
3a3cbeb7aa Collect stderr.log and stdout.log in all integration tests by default. 2021-06-29 17:30:47 +03:00
Mike Kot
4c391f8e99
SYSTEM RESTORE REPLICA replica [ON CLUSTER cluster] (#13652)
* initial commit: add setting and stub

* typo

* added test stub

* fix

* wip merging new integration test and code proto

* adding steps interpreters

* adding firstly proposed solution (moving parts etc)

* added checking zookeeper path existence

* fixing the include

* fixing and sorting includes

* fixing outdated struct

* fix the name

* added ast ptr as level of indirection

* fix ref

* updating the changes

* working on test stub

* fix iterator -> reference

* revert rocksdb submodule update

* fixed show privileges test

* updated the test stub

* replaced rand() with thread_local_rng(), updated the tests

updated the test

fixed test config path

test fix

removed error messages

fixed the test

updated the test

fixed string literal

fixed literal

typo: =

* fixed the empty replica error message

* updated the test and the code with logs

* updated the possible test cases, updated

* added the code/test milestone comments

* updated the test (added more testcases)

* replaced native assert with CH one

* individual replicas recursive delete fix

* updated the AS db.name AST

* two small logging fixes

* manually generated AST fixes

* Updated the test, added the possible algo change

* Some thoughts about optimizing the solution:

ALTER MOVE PARTITION .. TO TABLE -> move to detached/ + ALTER ... ATTACH

* fix

* Removed the replica sync in test as it's invalid

* Some test tweaks

* tmp

* Rewrote the algo by using the executeQuery instead of

hand-crafting the ASTPtr.

Two questions still active.

* tr: logging active parts

* Extracted the parts moving algo into a separate helper function

* Fixed the test data and the queries slightly

* Replaced query to system.parts to direct invocation,

started building the test that breaks on various parts.

* Added the case for tables when at least one replica is alive

* Updated the test to test replicas restoration by detaching/attaching

* Altered the test to check restoration without replica restart

* Added the tables swap in the start if the server failed last time

* Hotfix when only /replicas/replica... path was deleted

* Restore ZK paths while creating a replicated MergeTree table

* Updated the docs, fixed the algo for individual replicas restoration case

* Initial parts table storage fix, tests sync fix

* Reverted individual replica restoration to general algo

* Slightly optimised getDataParts

* Trying another solution with parts detaching

* Rewrote algo without any steps, added ON CLUSTER support

* Attaching parts from other replica on restoration

* Getting part checksums from ZK

* Removed ON CLUSTER, finished working solution

* Multiple small changes after review

* Fixing parallel test

* Supporting rewritten form on cluster

* Test fix

* Moar logging

* Using source replica as checksum provider

* improve test, remove some code from parser

* Trying solution with move to detached + forget

* Moving all parts (not only Committed) to detached

* Edited docs for RESTORE REPLICA

* Re-merging

* minor fixes

Co-authored-by: Alexander Tokmakov <avtokmakov@yandex-team.ru>
2021-06-20 11:24:43 +03:00
Vitaly Baranov
37ce6e26d3 Add a new clause GRANTEES to commands CREATE USER and ALTER USER. 2021-03-14 19:12:42 +03:00
Vitaly Baranov
6a58bb5c23 Enable rbac tests with thread sanitizer. 2020-10-13 01:03:51 +03:00
alesapin
106040a720 Disable rbac tests with thread sanitizer 2020-10-12 10:04:46 +03:00
alesapin
a453e8dbe1 Add stderr log to test_grant_and_revoke 2020-10-06 17:07:00 +03:00
Azat Khuzhin
9cb3c743bd
Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00
bharatnc
b75963d370 Format and optimize imports in integration test files
This PR formats all the `*.py` files found under the `tests/integration`
folder. It also reorders the imports and cleans up a bunch of unused
imports.

The formatting also takes care of other things like wrapping lines and
fixing spaces and indents such that the tests look more readable.
2020-09-15 23:10:54 -07:00
Vitaly Baranov
4c8a8d5e67 Add test. 2020-08-22 01:59:52 +03:00
Vitaly Baranov
ad03ff3887 Rename storages users.xml=>users_xml, disk=>local_directory. 2020-08-16 16:42:57 +03:00
Denis Glazachev
a6a6f43422 Fix the test: auth_params is a JSON object 2020-07-12 01:40:24 +04:00
Vitaly Baranov
c66433a472 Add tests for implicit access rights. 2020-07-10 17:16:47 +03:00
Vitaly Baranov
d036682ef1 Split test 'test_create_user_and_login' into two. 2020-07-10 17:16:47 +03:00
Vitaly Baranov
4187edd9f9 Split integration test 'test_grant_and_revoke' into two tests. 2020-06-15 22:07:47 +03:00
Vitaly Baranov
98172deffc Show authentication type in table system.users and while executing SHOW CREATE USER query. 2020-05-28 08:34:10 +03:00
Vitaly Baranov
c30587196a Add system tables for users, roles and grants. 2020-05-14 14:12:20 +03:00
Vitaly Baranov
c97d12a19c Enable access management by default for all integration tests. 2020-04-09 10:22:51 +03:00
Vitaly Baranov
b71ff6160a Add the "access_management" option to users.xml which enables a user to manage access rights.
The option is turned off by default.
2020-04-07 23:31:54 +03:00
Ivan
97f2a2213e
Move all folders inside /dbms one level up (#9974)
* Move some code outside dbms/src folder
* Fix paths
2020-04-02 02:51:21 +03:00