2020-07-02 15:58:13 +00:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
import sys
|
|
|
|
from testflows.core import *
|
|
|
|
|
2020-10-15 20:23:49 +00:00
|
|
|
append_path(sys.path, "..")
|
2020-07-02 15:58:13 +00:00
|
|
|
|
|
|
|
from helpers.cluster import Cluster
|
|
|
|
from helpers.argparser import argparser
|
|
|
|
|
|
|
|
@TestFeature
|
|
|
|
@Name("example")
|
|
|
|
@ArgumentParser(argparser)
|
2020-10-15 20:23:49 +00:00
|
|
|
def regression(self, local, clickhouse_binary_path, stress=None, parallel=None):
|
2020-07-02 15:58:13 +00:00
|
|
|
"""Simple example of how you can use TestFlows to test ClickHouse.
|
|
|
|
"""
|
|
|
|
nodes = {
|
|
|
|
"clickhouse": ("clickhouse1",),
|
|
|
|
}
|
2020-10-15 20:23:49 +00:00
|
|
|
|
2020-07-02 15:58:13 +00:00
|
|
|
with Cluster(local, clickhouse_binary_path, nodes=nodes) as cluster:
|
|
|
|
self.context.cluster = cluster
|
|
|
|
|
|
|
|
Scenario(run=load("example.tests.example", "scenario"))
|
|
|
|
|
|
|
|
if main():
|
|
|
|
regression()
|