Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adding check for CHK with PVC, Updating requirements. #1399

Merged
merged 3 commits into from
Jun 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
---
# Fake Service to drop-in replacement in tests
apiVersion: v1
kind: Service
metadata:
# DNS would be like zookeeper.namespace.svc
name: zookeeper
labels:
app: zookeeper
spec:
ports:
- port: 2181
name: client
- port: 7000
name: prometheus
selector:
app: clickhouse-keeper
what: node
---
apiVersion: "clickhouse-keeper.altinity.com/v1"
kind: "ClickHouseKeeperInstallation"
metadata:
name: clickhouse-keeper
spec:
configuration:
clusters:
- name: "simple-3"
layout:
replicasCount: 3
settings:
logger/level: "trace"
logger/console: "true"
listen_host: "0.0.0.0"
keeper_server/storage_path: /var/lib/clickhouse-keeper
keeper_server/tcp_port: "2181"
keeper_server/four_letter_word_white_list: "*"
keeper_server/coordination_settings/raft_logs_level: "information"
keeper_server/raft_configuration/server/port: "9444"
prometheus/endpoint: "/metrics"
prometheus/port: "7000"
prometheus/metrics: "true"
prometheus/events: "true"
prometheus/asynchronous_metrics: "true"
prometheus/status_info: "false"
templates:
volumeClaimTemplates:
- name: default
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
10 changes: 6 additions & 4 deletions tests/e2e/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4655,13 +4655,14 @@ def test_047(self):

@TestScenario
@Name("test_048. Clickhouse-keeper")
@Requirements(RQ_SRS_026_ClickHouseOperator_CustomResource_Kind_ClickHouseKeeperInstallation("1.0"))
@Requirements(RQ_SRS_026_ClickHouseOperator_CustomResource_Kind_ClickHouseKeeperInstallation("1.0"),
RQ_SRS_026_ClickHouseOperator_CustomResource_ClickHouseKeeperInstallation_volumeClaimTemplates("1.0"))
def test_048(self):
"""Check clickhouse-operator support ClickHouseKeeperInstallation."""
"""Check clickhouse-operator support ClickHouseKeeperInstallation with PVC in keeper manifest."""

create_shell_namespace_clickhouse_template()
util.require_keeper(keeper_type="clickhouse-keeper_with_CHKI",
keeper_manifest="clickhouse-keeper-3-node-for-test-only.yaml")
keeper_manifest="clickhouse-keeper-3-node-with-volume-for-test-only.yaml")
manifest = f"manifests/chi/test-048-clickhouse-keeper.yaml"
chi = yaml_manifest.get_chi_name(util.get_full_path(manifest))
cluster = "default"
Expand Down Expand Up @@ -4691,7 +4692,7 @@ def test_048(self):
"CREATE TABLE test_distr_048 ON CLUSTER 'default' AS test_local_048 "
"Engine = Distributed('default', default, test_local_048, a%2)",
)

with And("Give CH some time to propagate new table"):
time.sleep(30)
with And("I insert data in the distributed table"):
Expand Down Expand Up @@ -4719,6 +4720,7 @@ def test_048(self):
delete_test_namespace()



@TestModule
@Name("e2e.test_operator")
@Requirements(RQ_SRS_026_ClickHouseOperator_CustomResource_APIVersion("1.0"),
Expand Down
Loading
Loading