Files
dolthub--dolt/integration-tests/mysql-client-tests/python/custom-version-string-test.py
T
wehub-resource-sync 5357c39144
Race tests / Go race tests (ubuntu-22.04) (push) Waiting to run
Fuzzer / Run Fuzzer (push) Waiting to run
chore: import upstream snapshot with attribution
2026-07-13 13:01:40 +08:00

23 lines
576 B
Python

import pymysql
import sys
def main():
user = sys.argv[1]
port = int(sys.argv[2])
db = sys.argv[3]
expected_version_string = sys.argv[4]
connection = pymysql.connect(host="127.0.0.1",
port=port,
user=user,
db=db)
if connection.server_version != expected_version_string:
print(f"Unexpected server version, expected {expected_version_string}, got {connection.server_version}")
sys.exit(1)
connection.close()
sys.exit(0)
main()