Skip to content

Commit aeb67f1

Browse files
egegunesjvpasinatto
authored andcommitted
add test case
1 parent 9960afb commit aeb67f1

File tree

4 files changed

+85
-0
lines changed

4 files changed

+85
-0
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
apiVersion: psmdb.percona.com/v1
2+
kind: PerconaServerMongoDB
3+
metadata:
4+
name: some-name
5+
spec:
6+
#platform: openshift
7+
image:
8+
imagePullPolicy: Always
9+
allowUnsafeConfigurations: false
10+
updateStrategy: SmartUpdate
11+
backup:
12+
enabled: false
13+
image: perconalab/percona-server-mongodb-operator:0.4.0-backup
14+
replsets:
15+
- name: rs0
16+
# readinessDelaySec: 40
17+
# livenessDelaySec: 120
18+
affinity:
19+
antiAffinityTopologyKey: none
20+
resources:
21+
limits:
22+
cpu: 500m
23+
memory: 0.5G
24+
requests:
25+
cpu: 100m
26+
memory: 0.1G
27+
configuration: |
28+
operationProfiling:
29+
mode: slowOp
30+
slowOpThresholdMs: 100
31+
security:
32+
enableEncryption: true
33+
redactClientLogData: false
34+
setParameter:
35+
ttlMonitorSleepSecs: 60
36+
wiredTigerConcurrentReadTransactions: 128
37+
wiredTigerConcurrentWriteTransactions: 128
38+
storage:
39+
engine: wiredTiger
40+
wiredTiger:
41+
collectionConfig:
42+
blockCompressor: snappy
43+
engineConfig:
44+
directoryForIndexes: false
45+
journalCompressor: snappy
46+
indexConfig:
47+
prefixCompression: true
48+
volumeSpec:
49+
persistentVolumeClaim:
50+
resources:
51+
requests:
52+
storage: 1Gi
53+
size: 3
54+
secrets:
55+
users: some-users

e2e-tests/preinit-updates/run

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
5+
test_dir=$(realpath $(dirname $0))
6+
. ${test_dir}/../functions
7+
set_debug
8+
9+
create_infra ${namespace}
10+
11+
cluster="some-name"
12+
desc "test starts on cluster: ${cluster}"
13+
14+
apply_cluster ${test_dir}/conf/${cluster}.yml
15+
wait_for_running ${cluster}-rs0 1 "false"
16+
echo "enabling backups"
17+
kubectl_bin patch psmdb ${cluster} --type=merge -p '{"spec":{"backup":{"enabled":true}}}'
18+
echo "sleeping for 7 seconds..."
19+
sleep 7
20+
echo "changing rs0 resources"
21+
kubectl_bin patch psmdb ${cluster} --type=json -p '[{"op":"replace","path":"/spec/replsets/0/resources/limits/cpu","value":"550m"}]'
22+
23+
wait_for_running ${cluster}-rs0 3
24+
wait_cluster_consistency "${cluster}"
25+
26+
desc 'test passed'
27+
28+
destroy $namespace

e2e-tests/run-pr.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ operator-self-healing-chaos
3131
pitr
3232
pitr-sharded
3333
pitr-physical
34+
preinit-updates
3435
pvc-resize
3536
recover-no-primary
3637
replset-overrides

e2e-tests/run-release.csv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ operator-self-healing-chaos
3232
pitr
3333
pitr-sharded
3434
pitr-physical
35+
preinit-updates
3536
pvc-resize
3637
recover-no-primary
3738
replset-overrides

0 commit comments

Comments
 (0)