Skip to content

Commit

Permalink
Merge pull request #24426 from pgellert/fix/license-enforcement-test-…
Browse files Browse the repository at this point in the history
…after-25-1

dt/license_enforcement: delay disabling trial license
  • Loading branch information
michael-redpanda authored Dec 4, 2024
2 parents d6bd4be + 1e7f4b7 commit 5dedfdc
Showing 1 changed file with 20 additions and 6 deletions.
26 changes: 20 additions & 6 deletions tests/rptest/tests/license_enforcement_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,6 @@ def setUp(self):
)
def test_license_enforcement(self, clean_node_before_recovery,
clean_node_after_recovery):
self.redpanda.set_environment(
{'__REDPANDA_DISABLE_BUILTIN_TRIAL_LICENSE': True})

installer = self.redpanda._installer
prev_version = installer.highest_from_prior_feature_version(
RedpandaInstaller.HEAD)
Expand All @@ -73,6 +70,16 @@ def test_license_enforcement(self, clean_node_before_recovery,
self.redpanda.set_cluster_config(
{"partition_autobalancing_mode": "continuous"})

self.logger.info(
"Disabling the trial license to simulate that the license expired")
self.redpanda.set_environment(
{'__REDPANDA_DISABLE_BUILTIN_TRIAL_LICENSE': True})
self.redpanda.restart_nodes(self.redpanda.nodes)
self.redpanda.wait_until(self.redpanda.healthy,
timeout_sec=60,
backoff_sec=1,
err_msg="The cluster hasn't stabilized")

first_upgraded = self.redpanda.nodes[0]
self.logger.info(
f"Upgrading node {first_upgraded} expecting it to crash")
Expand Down Expand Up @@ -112,9 +119,6 @@ def test_license_enforcement(self, clean_node_before_recovery,
@cluster(num_nodes=5, log_allow_list=LOG_ALLOW_LIST)
@matrix(clean_node_before_upgrade=[False, True])
def test_escape_hatch_license_variable(self, clean_node_before_upgrade):
self.redpanda.set_environment(
{'__REDPANDA_DISABLE_BUILTIN_TRIAL_LICENSE': True})

installer = self.redpanda._installer
prev_version = installer.highest_from_prior_feature_version(
RedpandaInstaller.HEAD)
Expand All @@ -136,6 +140,16 @@ def test_escape_hatch_license_variable(self, clean_node_before_upgrade):
self.redpanda.set_cluster_config(
{"partition_autobalancing_mode": "continuous"})

self.logger.info(
"Disabling the trial license to simulate that the license expired")
self.redpanda.set_environment(
{'__REDPANDA_DISABLE_BUILTIN_TRIAL_LICENSE': True})
self.redpanda.restart_nodes(self.redpanda.nodes)
self.redpanda.wait_until(self.redpanda.healthy,
timeout_sec=60,
backoff_sec=1,
err_msg="The cluster hasn't stabilized")

first_upgraded = self.redpanda.nodes[0]
first_upgraded_id = self.redpanda.node_id(first_upgraded)
self.logger.info(
Expand Down

0 comments on commit 5dedfdc

Please sign in to comment.