Skip to content

Commit

Permalink
Add test step for verify-vrep to verify replication from empty db (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jizhuoyu authored and cchen-vertica committed Jul 24, 2024
1 parent 0b2d82a commit 17a4740
Show file tree
Hide file tree
Showing 5 changed files with 80 additions and 0 deletions.
22 changes: 22 additions & 0 deletions tests/e2e-leg-9/verify-vrep/06-create-vrep.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# (c) Copyright [2021-2024] Open Text.
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: vertica.com/v1beta1
kind: VerticaReplicator
metadata:
name: vrep-test-empty
spec:
source:
verticaDB: "v-source"
target:
verticaDB: "v-target"
39 changes: 39 additions & 0 deletions tests/e2e-leg-9/verify-vrep/07-assert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# (c) Copyright [2021-2024] Open Text.
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: v1
kind: Event
reason: ReplicationStarted
source:
component: verticadb-operator
involvedObject:
apiVersion: vertica.com/v1beta1
kind: VerticaReplicator
name: vrep-test-empty
---
apiVersion: v1
kind: Event
reason: ReplicationSucceeded
source:
component: verticadb-operator
involvedObject:
apiVersion: vertica.com/v1beta1
kind: VerticaReplicator
name: vrep-test-empty
---
apiVersion: vertica.com/v1beta1
kind: VerticaReplicator
metadata:
name: vrep-test-empty
status:
state: "Replication successful"
19 changes: 19 additions & 0 deletions tests/e2e-leg-9/verify-vrep/07-verify-conditions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# (c) Copyright [2021-2024] Open Text.
# Licensed under the Apache License, Version 2.0 (the "License");
# You may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

apiVersion: kuttl.dev/v1beta1
kind: TestStep
commands:
# verifying type:"ReplicationReady" and "ReplicationComplete", and status:"True"
- script: kubectl wait --for=condition=ReplicationReady=True -n $NAMESPACE vrep/vrep-test-empty --timeout=600s
- script: kubectl wait --for=condition=ReplicationComplete=True -n $NAMESPACE vrep/vrep-test-empty --timeout=600s
File renamed without changes.

0 comments on commit 17a4740

Please sign in to comment.