Skip to content

Commit

Permalink
Merge pull request #5460 from ZhiHanZ/logic_test_additonal_headers
Browse files Browse the repository at this point in the history
chore: add feature flagging for logic tst
  • Loading branch information
BohuTANG authored May 19, 2022
2 parents 7697c1b + 458f156 commit e7e4c6f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 10 deletions.
8 changes: 6 additions & 2 deletions tests/logictest/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ def config_from_env():

mysql_port = os.getenv("QUERY_MYSQL_HANDLER_PORT")
if mysql_port is not None:
mysql_config['port'] = mysql_port
mysql_config['port'] = int(mysql_port)

http_host = os.getenv("QUERY_HTTP_HANDLER_HOST")
if http_host is not None:
http_config["host"] = http_host

http_port = os.getenv("QUERY_HTTP_HANDLER_PORT")
if http_port is not None:
http_config['port'] = http_port
http_config['port'] = int(http_port)

mysql_database = os.getenv("MYSQL_DATABASE")
if mysql_database is not None:
Expand Down
21 changes: 13 additions & 8 deletions tests/logictest/main.py
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import os

from mysql_runner import TestMySQL
from http_runner import TestHttp

from config import mysql_config, http_config

if __name__ == '__main__':
mySQL = TestMySQL("mysql")
mySQL.set_driver(mysql_config)
mySQL.set_label("mysql")
mySQL.run_sql_suite()
disable_mysql_test = os.getenv("DISABLE_MYSQL_LOGIC_TEST")
if disable_mysql_test is not None:
mySQL = TestMySQL("mysql")
mySQL.set_driver(mysql_config)
mySQL.set_label("mysql")
mySQL.run_sql_suite()

http = TestHttp("http")
http.set_driver(http_config)
http.set_label("http")
http.run_sql_suite()
disable_http_test = os.getenv("DISABLE_HTTP_LOGIC_TEST")
if disable_http_test is not None:
http = TestHttp("http")
http.set_driver(http_config)
http.set_label("http")
http.run_sql_suite()

0 comments on commit e7e4c6f

Please sign in to comment.