From 870d9248026cb230c6597b766c8e2a20120677c8 Mon Sep 17 00:00:00 2001 From: Bugen Zhao Date: Tue, 25 Jun 2024 15:49:03 +0800 Subject: [PATCH] refine tests Signed-off-by: Bugen Zhao --- e2e_test/error_ui/simple/license.slt | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/e2e_test/error_ui/simple/license.slt b/e2e_test/error_ui/simple/license.slt index 6091d75e59b7c..22bd4c60cf689 100644 --- a/e2e_test/error_ui/simple/license.slt +++ b/e2e_test/error_ui/simple/license.slt @@ -32,6 +32,23 @@ Caused by these errors (recent errors listed first): 5: InvalidToken +# Set the license key to empty. This demonstrates the default behavior in production, i.e., free tier. +statement ok +ALTER SYSTEM SET license_key TO ''; + +query error +SELECT rw_test_paid_tier(); +---- +db error: ERROR: Failed to run the query + +Caused by these errors (recent errors listed first): + 1: Expr error + 2: error while evaluating expression `test_paid_tier()` + 3: feature TestPaid is only available for tier Paid and above, while the current tier is Free + +Hint: You may want to set a license key with `ALTER SYSTEM SET license_key = '...';` command. + + # Set the license key to default. In debug mode, this will set the license key to a paid tier key. statement ok ALTER SYSTEM SET license_key TO DEFAULT;