ClickHouse/tests/testflows
2020-12-01 05:58:45 +01:00
..
aes_encryption Updating TestFlows to 1.6.59 2020-10-27 18:50:59 -04:00
example testflows RBAC tests for views, distributed tables, public tables, and privileges: alter, updated select, updated insert, and show tables 2020-10-15 22:23:49 +02:00
helpers Fixing bug in LDAP add_config method where log size was grabbed before container was stopped. 2020-10-27 18:45:04 -04:00
ldap Moving to using TestFlows version 1.6.65 2020-11-17 20:22:43 -05:00
rbac New RBAC testflows tests for SHOW, TRUNCATE, KILL, and OPTIMIZE. 2020-12-01 05:58:45 +01:00
README.md Updating README.md. 2020-07-28 16:44:46 -04:00
regression.py Merge branch 'master' of https://github.com/ClickHouse/ClickHouse into testflows_RBAC_tests 2020-10-21 23:08:23 +02:00
runner Convert to python3 (#15007) 2020-10-02 19:54:07 +03:00

ClickHouse Tests in TestFlows

This directory contains integration tests written using TestFlows that involves several ClickHouse instances, custom configs, ZooKeeper, etc.

Supported environment

Prerequisites

Running tests locally

You can run tests locally by passing --local and --clickhouse-binary-path to the regression.py.

  • --local specifies that regression will be run locally
  • --clickhouse-binary-path specifies the path to the ClickHouse binary that will be used during the regression run

Note: you can pass -h or --help argument to the regression.py to see a help message.

python3 regression.py -h

Note: make sure that the ClickHouse binary has correct permissions. If you are using /usr/bin/clickhouse its owner and group is set to root:root by default and it needs to be changed to clickhouse:clickhouse. You can change the owner and the group using the following command.

sudo chown clickhouse:clickhouse /usr/bin/clickhouse

Using the default ClickHouse installation and its server binary at /usr/bin/clickhouse, you can run regressions locally using the following command.

python3 regression.py --local --clickhouse-binary-path "/usr/bin/clickhouse"

Output Verbosity

You can control verbosity of the output by specifying the output format with -o or --output option. See --help for more details.

Running Only Selected Tests

You can run only the selected tests by passing --only option to the regression.py.

For example,

./regression.py --local --clickhouse-binary-path /usr/bin/clickhouse --only "/clickhouse/rbac/syntax/grant privilege/*"

will execute all rbac/syntax/grant privilege tests.

If you want to run only a single test such as the /clickhouse/rbac/syntax/grant privilege/grant privileges/privilege='KILL QUERY', on=('*.*',), allow_introspection=False you can do it as follows

./regression.py --local --clickhouse-binary-path /usr/bin/clickhouse --only "/clickhouse/rbac/syntax/grant privilege/grant privileges/privilege='KILL QUERY', on=('[*].[*]',), allow_introspection=False/*"

Note that you need to surround special characters such as * with square brackets, for example [*].

Note that you need to end the filtering pattern with /* to run all the steps inside the test.

For more information, please see Filtering section in the TestFlows Handbook.