From dfdde79af8f9df6b3e330e39f91665cb8c34cb05 Mon Sep 17 00:00:00 2001 From: "Michael J. Sullivan" Date: Tue, 26 Nov 2024 15:57:11 -0800 Subject: [PATCH] A bunch of annoying logic to figure out whether admin is there Or I could just wait until it is in all live nightlies and never care again, but oh well. It's probably fine if other bindings do that. --- gel/_testbase.py | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/gel/_testbase.py b/gel/_testbase.py index 86485eb8..d042ba64 100644 --- a/gel/_testbase.py +++ b/gel/_testbase.py @@ -96,10 +96,22 @@ def _start_cluster(*, cleanup_atexit=True): capture_output=True, text=True, ) - print("VERSION", version_res.stdout) - is_gel = version_res.stdout.startswith('gel-server,') - role = 'admin' if is_gel else 'edgedb' + version_line = version_res.stdout + print("VERSION", version_line) + is_gel = version_line.startswith('gel-server,') + + # The default role became admin in nightly build 9024 for 6.0 + if is_gel: + if '6.0-dev' in version_line: + rev = int(version_line.split('.')[2]) + has_admin = rev >= 9024 + else: + has_admin = True + else: + has_admin = False + + role = 'admin' if has_admin else 'edgedb' args = [ gel_server, "--temp-dir",