From 47dd7d19f8ee423e81819fa2fdf23a8c3166061f Mon Sep 17 00:00:00 2001 From: Ahmad Murzahmatov Date: Wed, 9 Jul 2025 20:08:39 +0600 Subject: [PATCH 1/2] [tests] Run tests w/ requests and limits Signed-off-by: Ahmad Murzahmatov --- hack/e2e-apps/clickhouse.bats | 26 ++++++++++----- hack/e2e-apps/kafka.bats | 29 ++++++++++------- hack/e2e-apps/kubernetes.bats | 54 ++++++++++++++++++++++++------- hack/e2e-apps/mysql.bats | 29 +++++++++++------ hack/e2e-apps/postgres.bats | 27 ++++++++++------ hack/e2e-apps/redis.bats | 24 +++++++++++--- hack/e2e-apps/virtualmachine.bats | 30 +++++++++++------ hack/e2e-apps/vminstance.bats | 34 +++++++++++++------ 8 files changed, 179 insertions(+), 74 deletions(-) diff --git a/hack/e2e-apps/clickhouse.bats b/hack/e2e-apps/clickhouse.bats index 95d86d02..2fb2470d 100644 --- a/hack/e2e-apps/clickhouse.bats +++ b/hack/e2e-apps/clickhouse.bats @@ -2,6 +2,18 @@ @test "Create DB ClickHouse" { name='test' + withResources='true' + if [ "$withResources" == 'true' ]; then + resources=$(cat < admin.conf + KUBECONFIG=admin.conf kubectl -n cozy-ingress-nginx wait --timeout=3m deploy ingress-nginx-defaultbackend --for=jsonpath='{.status.conditions[0].status}'=True + KUBECONFIG=admin.conf kubectl -n cozy-monitoring wait --timeout=3m deploy cozy-monitoring-agents-metrics-server --for=jsonpath='{.status.conditions[0].status}'=True } + +@test "Create a PVC in tenant Kubernetes" { + name='test' + KUBECONFIG=admin.conf kubectl apply -f - < Date: Thu, 11 Sep 2025 17:58:11 +0200 Subject: [PATCH 2/2] [tests] #1130 error correction --- hack/e2e-apps/clickhouse.bats | 8 +++++++- hack/e2e-apps/kafka.bats | 1 - hack/e2e-apps/mysql.bats | 2 +- hack/e2e-apps/vminstance.bats | 4 ++-- 4 files changed, 10 insertions(+), 5 deletions(-) diff --git a/hack/e2e-apps/clickhouse.bats b/hack/e2e-apps/clickhouse.bats index 2fb2470d..1a4e4c44 100644 --- a/hack/e2e-apps/clickhouse.bats +++ b/hack/e2e-apps/clickhouse.bats @@ -46,6 +46,12 @@ EOF kubectl -n tenant-test wait --timeout=40s hr clickhouse-$name --for=condition=ready kubectl -n tenant-test wait --timeout=130s clickhouses $name --for=condition=ready kubectl -n tenant-test wait --timeout=120s sts chi-clickhouse-$name-clickhouse-0-0 --for=jsonpath='{.status.replicas}'=1 - timeout 210 sh -ec "until kubectl -n tenant-test wait svc chendpoint-clickhouse-$name --for=jsonpath='{.spec.ports[0].port}'=8123; do sleep 10; done" + timeout 210 sh -ec " + until [ \"\$(kubectl -n tenant-test get svc chendpoint-clickhouse-$name \ + -o jsonpath='{.spec.ports[?(@.port==8123)].port}')\" = \"8123\" ]; do + echo 'Waiting for ClickHouse service port 8123...' + sleep 10 + done + " kubectl -n tenant-test delete clickhouse.apps.cozystack.io $name } diff --git a/hack/e2e-apps/kafka.bats b/hack/e2e-apps/kafka.bats index 41c47c5c..879aa906 100644 --- a/hack/e2e-apps/kafka.bats +++ b/hack/e2e-apps/kafka.bats @@ -5,7 +5,6 @@ withResources='true' if [ "$withResources" == 'true' ]; then resources=$(cat <