Skip to content

Commit f5a4e59

Browse files
committed
Allow custom images in tests
1 parent 9748cbe commit f5a4e59

10 files changed

+49
-0
lines changed

tests/templates/kuttl/cluster-operation/10-install-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ metadata:
1414
name: test-zk
1515
spec:
1616
image:
17+
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
18+
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
19+
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
20+
{% else %}
1721
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
22+
{% endif %}
1823
pullPolicy: IfNotPresent
1924
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2025
clusterConfig:

tests/templates/kuttl/cluster-operation/20-stop-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ metadata:
55
name: test-zk
66
spec:
77
image:
8+
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
9+
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
10+
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
11+
{% else %}
812
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
13+
{% endif %}
914
pullPolicy: IfNotPresent
1015
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1116
clusterConfig:

tests/templates/kuttl/cluster-operation/30-pause-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ metadata:
55
name: test-zk
66
spec:
77
image:
8+
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
9+
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
10+
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
11+
{% else %}
812
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
13+
{% endif %}
914
pullPolicy: IfNotPresent
1015
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1116
clusterConfig:

tests/templates/kuttl/cluster-operation/40-restart-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ metadata:
55
name: test-zk
66
spec:
77
image:
8+
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
9+
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
10+
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
11+
{% else %}
812
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
13+
{% endif %}
914
pullPolicy: IfNotPresent
1015
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
1116
clusterConfig:

tests/templates/kuttl/delete-rolegroup/05-install-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ metadata:
1414
name: test-zk
1515
spec:
1616
image:
17+
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
18+
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
19+
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
20+
{% else %}
1721
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
22+
{% endif %}
1823
pullPolicy: IfNotPresent
1924
clusterConfig:
2025
tls:

tests/templates/kuttl/delete-rolegroup/10-remove-secondary.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ metadata:
55
name: test-zk
66
spec:
77
image:
8+
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
9+
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
10+
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
11+
{% else %}
812
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
13+
{% endif %}
914
pullPolicy: IfNotPresent
1015
clusterConfig:
1116
tls:

tests/templates/kuttl/logging/11-install-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,12 @@ metadata:
2828
name: test-zk
2929
spec:
3030
image:
31+
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
32+
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
33+
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
34+
{% else %}
3135
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
36+
{% endif %}
3237
pullPolicy: IfNotPresent
3338
clusterConfig:
3439
vectorAggregatorConfigMapName: zookeeper-vector-aggregator-discovery

tests/templates/kuttl/smoke/10-install-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ metadata:
1414
name: test-zk
1515
spec:
1616
image:
17+
{% if test_scenario['values']['zookeeper'].find(",") > 0 %}
18+
custom: "{{ test_scenario['values']['zookeeper'].split(',')[1] }}"
19+
productVersion: "{{ test_scenario['values']['zookeeper'].split(',')[0] }}"
20+
{% else %}
1721
productVersion: "{{ test_scenario['values']['zookeeper'] }}"
22+
{% endif %}
1823
pullPolicy: IfNotPresent
1924
clusterConfig:
2025
{% if test_scenario['values']['use-server-tls'] == 'true' %}

tests/templates/kuttl/znode/10-install-zookeeper.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,12 @@ metadata:
1414
name: test-zk
1515
spec:
1616
image:
17+
{% if test_scenario['values']['zookeeper-latest'].find(",") > 0 %}
18+
custom: "{{ test_scenario['values']['zookeeper-latest'].split(',')[1] }}"
19+
productVersion: "{{ test_scenario['values']['zookeeper-latest'].split(',')[0] }}"
20+
{% else %}
1721
productVersion: "{{ test_scenario['values']['zookeeper-latest'] }}"
22+
{% endif %}
1823
pullPolicy: IfNotPresent
1924
{% if lookup('env', 'VECTOR_AGGREGATOR') %}
2025
clusterConfig:

tests/test-definition.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,13 @@ dimensions:
33
- name: zookeeper
44
values:
55
- 3.9.2
6+
# To use a custom image, add a comma and the full name after the product version
7+
# - 3.9.2,docker.stackable.tech/stackable/zookeeper:3.9.2-stackable0.0.0-dev
68
- name: zookeeper-latest
79
values:
810
- 3.9.2
11+
# To use a custom image, add a comma and the full name after the product version
12+
# - 3.9.2,docker.stackable.tech/stackable/zookeeper:3.9.2-stackable0.0.0-dev
913
- name: use-server-tls
1014
values:
1115
- "true"

0 commit comments

Comments
 (0)