Skip to content

Commit 36b604b

Browse files
authored
chore: expand opa-authorization test to run with all supported trino versions (#727)
chore: expand opa-authorization test to run with all trino versions
1 parent a3a6cb2 commit 36b604b

File tree

3 files changed

+9
-5
lines changed

3 files changed

+9
-5
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ 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] }}"
8+
{% if test_scenario['values']['trino'].find(",") > 0 %}
9+
custom: "{{ test_scenario['values']['trino'].split(',')[1] }}"
10+
productVersion: "{{ test_scenario['values']['trino'].split(',')[0] }}"
1111
{% else %}
12-
productVersion: "{{ test_scenario['values']['trino-latest'] }}"
12+
productVersion: "{{ test_scenario['values']['trino'] }}"
1313
{% endif %}
1414
pullPolicy: IfNotPresent
1515
clusterConfig:

tests/templates/kuttl/opa-authorization/check-opa.py renamed to tests/templates/kuttl/opa-authorization/check-opa.py.j2

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,11 @@
5151
{
5252
"query": "SET SESSION iceberg.test=true",
5353
# The requests are authorized, just a fake property
54+
{% if test_scenario['values']['trino'] == '470' %}
5455
"error": "Session property iceberg.test does not exist",
56+
{% else %}
57+
"error": "Session property 'iceberg.test' does not exist",
58+
{% endif %}
5559
},
5660
# ## SCHEMA ##
5761
# ExecuteQuery, AccessCatalog, ShowSchemas, SelectFromColumns, FilterCatalogs, FilterSchemas

tests/test-definition.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ tests:
106106
- openshift
107107
- name: opa-authorization
108108
dimensions:
109-
- trino-latest
109+
- trino
110110
- hive-latest
111111
- opa
112112
- keycloak

0 commit comments

Comments
 (0)