Skip to content
Permalink
Browse files
Pass enable_scripted_user_defined_functions to clusters with version …
…>= 3.0

patch by Ekaterina Dimitrova, review by Brandon Williams for CASSANDRA-16736
  • Loading branch information
ekaterinadimitrova2 committed Jul 20, 2021
1 parent 7bf5be8 commit af5d69e7efbab5a609bf0556b2c59f58e7acc5a2
Showing 1 changed file with 8 additions and 3 deletions.
@@ -97,10 +97,14 @@ class TestCqlsh(Tester, CqlshMixin):
# override cluster options to enable user defined functions
# currently only needed for test_describe
@pytest.fixture
def fixture_dtest_setup_overrides(self):
def fixture_dtest_setup_overrides(self, dtest_config):
dtest_setup_overrides = DTestSetupOverrides()
dtest_setup_overrides.cluster_options = ImmutableMapping({'enable_user_defined_functions': 'true',
'enable_scripted_user_defined_functions': 'true'})
if dtest_config.cassandra_version_from_build >= '3.0':
dtest_setup_overrides.cluster_options = ImmutableMapping({'enable_user_defined_functions': 'true',
'enable_scripted_user_defined_functions': 'true'})
else:
dtest_setup_overrides.cluster_options = ImmutableMapping({'enable_user_defined_functions': 'true'})

return dtest_setup_overrides

@classmethod
@@ -892,6 +896,7 @@ def test_describe_describes_non_default_compaction_parameters(self):
assert "'min_threshold': '10'" in stdout
assert "'max_threshold': '100'" in stdout

@since('3.0')
def test_describe_functions(self, fixture_dtest_setup_overrides):
"""Test DESCRIBE statements for functions and aggregate functions"""
self.cluster.populate(1)

0 comments on commit af5d69e

Please sign in to comment.