Skip to content

Commit c2b9508

Browse files
authored
Allow using custom images in tests (#652)
* Allow using custom images in tests * YAML indentation
1 parent 339abc8 commit c2b9508

File tree

12 files changed

+59
-0
lines changed

12 files changed

+59
-0
lines changed

tests/templates/kuttl/authentication/create-trino-cluster.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@ metadata:
1717
namespace: $NAMESPACE
1818
spec:
1919
image:
20+
{% if test_scenario['values']['trino-latest'].find(",") > 0 %}
21+
custom: "{{ test_scenario['values']['trino-latest'].split(',')[1] }}"
22+
productVersion: "'"{{ test_scenario['values']['trino-latest'].split(',')[0] }}"'"
23+
{% else %}
2024
productVersion: "'"{{ test_scenario['values']['trino-latest'] }}"'"
25+
{% endif %}
2126
pullPolicy: IfNotPresent
2227
clusterConfig:
2328
catalogLabelSelector: {}

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

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

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

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

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

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

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

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

tests/templates/kuttl/logging/03-install-trino.yaml.j2

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,12 @@ metadata:
3131
name: test-trino
3232
spec:
3333
image:
34+
{% if test_scenario['values']['trino'].find(",") > 0 %}
35+
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
36+
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
37+
{% else %}
3438
productVersion: "{{ test_scenario['values']['trino'] }}"
39+
{% endif %}
3540
pullPolicy: IfNotPresent
3641
clusterConfig:
3742
catalogLabelSelector: {}

tests/templates/kuttl/opa-authorization/20-install-trino.yaml.j2

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

tests/templates/kuttl/orphaned-resources/1-install-trino.yaml.j2

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

tests/templates/kuttl/resources/10-install-trino.yaml.j2

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

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

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

0 commit comments

Comments
 (0)