From 1b375b4c91207a83647a701b875f123a5031164f Mon Sep 17 00:00:00 2001 From: Sebastian Bernauer Date: Fri, 29 Sep 2023 10:52:37 +0200 Subject: [PATCH] add test --- rust/operator-binary/src/operations/pdb.rs | 4 ++-- tests/templates/kuttl/smoke/30-assert.yaml | 27 ++++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/rust/operator-binary/src/operations/pdb.rs b/rust/operator-binary/src/operations/pdb.rs index 3c06f337..db532019 100644 --- a/rust/operator-binary/src/operations/pdb.rs +++ b/rust/operator-binary/src/operations/pdb.rs @@ -23,7 +23,7 @@ pub enum Error { pub async fn add_pdbs( pdb: &PdbConfig, - zookeeper: &HbaseCluster, + hbase: &HbaseCluster, role: &HbaseRole, client: &Client, cluster_resources: &mut ClusterResources, @@ -37,7 +37,7 @@ pub async fn add_pdbs( HbaseRole::RestServer => max_unavailable_rest_servers(), }); let pdb = PodDisruptionBudgetBuilder::new_with_role( - zookeeper, + hbase, APP_NAME, &role.to_string(), OPERATOR_NAME, diff --git a/tests/templates/kuttl/smoke/30-assert.yaml b/tests/templates/kuttl/smoke/30-assert.yaml index c50ea9af..c3b9f698 100644 --- a/tests/templates/kuttl/smoke/30-assert.yaml +++ b/tests/templates/kuttl/smoke/30-assert.yaml @@ -28,3 +28,30 @@ metadata: status: readyReplicas: 1 replicas: 1 +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: test-hbase-master +status: + expectedPods: 1 + currentHealthy: 1 + disruptionsAllowed: 1 +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: test-hbase-regionserver +status: + expectedPods: 1 + currentHealthy: 1 + disruptionsAllowed: 1 +--- +apiVersion: policy/v1 +kind: PodDisruptionBudget +metadata: + name: test-hbase-restserver +status: + expectedPods: 1 + currentHealthy: 1 + disruptionsAllowed: 1