Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: patch rpk cluster license test #5731

Merged
merged 1 commit into from
Jul 29, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/rptest/tests/rpk_cluster_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -247,14 +247,14 @@ def test_upload_cluster_license_rpk(self):

@cluster(num_nodes=3)
def test_upload_cluster_license_error(self):
license = get_cluster_license()
if license is None:
self.logger.info(
"Skipping test, REDPANDA_SAMPLE_LICENSE env var not found")
return

with expect_exception(RpkException,
lambda e: "Internal Server Error" in str(e)):
license = get_cluster_license()
if license is None:
self.logger.info(
"Skipping test, REDPANDA_SAMPLE_LICENSE env var not found")
return

with tempfile.NamedTemporaryFile() as tf:
tf.write(bytes(license + 'r', 'UTF-8'))
tf.seek(0)
Expand Down