Skip to content

Commit a103c2c

Browse files
committed
feat: support custom product versions
1 parent 54f80b5 commit a103c2c

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

tests/templates/kuttl/smoke/check-s3.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import trino
33
import argparse
44
import sys
5+
import re
56

67
if not sys.warnoptions:
78
import warnings
@@ -48,8 +49,11 @@ def run_query(connection, query):
4849
trino_version = run_query(connection, "select node_version from system.runtime.nodes where coordinator = true and state = 'active'")[0][0]
4950
print(f"[INFO] Testing against Trino version \"{trino_version}\"")
5051

51-
assert len(trino_version) >= 3
52-
assert trino_version.isnumeric()
52+
# Strip SDP release suffix from the version string
53+
trino_product_version = re.split(r'-stackable', trino_version, maxsplit=1)[0]
54+
55+
assert len(trino_product_version) >= 3
56+
assert trino_product_version.isnumeric()
5357
assert trino_version == run_query(connection, "select version()")[0][0]
5458

5559
run_query(connection, "CREATE SCHEMA IF NOT EXISTS hive.minio WITH (location = 's3a://trino/')")

tests/templates/kuttl/smoke_aws/check-s3.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import trino
33
import argparse
44
import sys
5+
import re
56

67
if not sys.warnoptions:
78
import warnings
@@ -57,8 +58,11 @@ def run_query(connection, query):
5758
)[0][0]
5859
print(f'[INFO] Testing against Trino version "{trino_version}"')
5960

60-
assert len(trino_version) >= 3
61-
assert trino_version.isnumeric()
61+
# Strip SDP release suffix from the version string
62+
trino_product_version = re.split(r'-stackable', trino_version, maxsplit=1)[0]
63+
64+
assert len(trino_product_version) >= 3
65+
assert trino_product_version.isnumeric()
6266
assert trino_version == run_query(connection, "select version()")[0][0]
6367

6468
# WARNING (@NickLarsenNZ): Hard-coded bucket

0 commit comments

Comments
 (0)