From 819ceda31f09502236b0a20801bb3df02ada9258 Mon Sep 17 00:00:00 2001 From: Ping Xiao Date: Wed, 12 Aug 2020 22:45:10 +0800 Subject: [PATCH] update client test case --- tests/pytest/client/client.py | 8 +------ tests/pytest/client/version.py | 41 ++++++++++++++++++++++++++++++++++ tests/pytest/fulltest.sh | 1 + tests/pytest/regressiontest.sh | 1 + 4 files changed, 44 insertions(+), 7 deletions(-) create mode 100644 tests/pytest/client/version.py diff --git a/tests/pytest/client/client.py b/tests/pytest/client/client.py index 6fd2a2b6bd..b40511094b 100644 --- a/tests/pytest/client/client.py +++ b/tests/pytest/client/client.py @@ -27,13 +27,7 @@ class TDTestCase: ret = tdSql.query('select database()') tdSql.checkData(0, 0, "db") - - ret = tdSql.query('select server_version()') - tdSql.checkData(0, 0, "2.0.0.0") - - ret = tdSql.query('select client_version()') - tdSql.checkData(0, 0, "2.0.0.0") - + ret = tdSql.query('select server_status()') tdSql.checkData(0, 0, 1) diff --git a/tests/pytest/client/version.py b/tests/pytest/client/version.py new file mode 100644 index 0000000000..bc2e58f106 --- /dev/null +++ b/tests/pytest/client/version.py @@ -0,0 +1,41 @@ +################################################################### +# Copyright (c) 2016 by TAOS Technologies, Inc. +# All rights reserved. +# +# This file is proprietary and confidential to TAOS Technologies. +# No part of this file may be reproduced, stored, transmitted, +# disclosed or used in any form or by any means other than as +# expressly provided by the written permission from Jianhui Tao +# +################################################################### + +# -*- coding: utf-8 -*- + +import sys +from util.log import * +from util.cases import * +from util.sql import * + + +class TDTestCase: + def init(self, conn, logSql): + tdLog.debug("start to execute %s" % __file__) + tdSql.init(conn.cursor(), logSql) + + def run(self): + tdSql.prepare() + + ret = tdSql.query('select server_version()') + tdSql.checkData(0, 0, "2.0.0.6") + + ret = tdSql.query('select client_version()') + tdSql.checkData(0, 0, "2.0.0.6") + + + def stop(self): + tdSql.close() + tdLog.success("%s successfully executed" % __file__) + + +tdCases.addWindows(__file__, TDTestCase()) +tdCases.addLinux(__file__, TDTestCase()) diff --git a/tests/pytest/fulltest.sh b/tests/pytest/fulltest.sh index cbe82b2c8c..8e0f6314e0 100755 --- a/tests/pytest/fulltest.sh +++ b/tests/pytest/fulltest.sh @@ -158,6 +158,7 @@ python3 ./test.py -f alter/alter_table_crash.py # client python3 ./test.py -f client/client.py +python3 ./test.py -f client/version.py # Misc python3 testCompress.py diff --git a/tests/pytest/regressiontest.sh b/tests/pytest/regressiontest.sh index 61ec491f5d..20f4b4dc3b 100755 --- a/tests/pytest/regressiontest.sh +++ b/tests/pytest/regressiontest.sh @@ -152,6 +152,7 @@ python3 ./test.py -f alter/alter_table_crash.py # client python3 ./test.py -f client/client.py +python3 ./test.py -f client/version.py # Misc python3 testCompress.py -- GitLab