Skip to content

Commit

Permalink
Switch kqp yt tests to yt suites (#13152)
Browse files Browse the repository at this point in the history
  • Loading branch information
vitstn authored Jan 2, 2025
1 parent 77b7c35 commit 916a423
Show file tree
Hide file tree
Showing 22 changed files with 49 additions and 45 deletions.
2 changes: 1 addition & 1 deletion ydb/tests/fq/yt/kqp_yt_file.make
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ DEPENDS(

DATA(
arcadia/ydb/library/yql/tests/sql
arcadia/yql/essentials/tests/sql/suites
arcadia/yt/yql/tests/sql/suites
arcadia/ydb/tests/fq/yt
arcadia/ydb/tests/fq/yt/cfg
)
Expand Down
12 changes: 8 additions & 4 deletions ydb/tests/fq/yt/kqp_yt_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,15 @@

import pytest

import yatest.common
from test_file_common import check_provider, get_sql_query
from kqprun import KqpRun
from test_utils import DATA_PATH, get_config, get_parameters_files, replace_vars
from test_utils import get_config, get_parameters_files, replace_vars
from yql_utils import KSV_ATTR, get_files, get_http_files, get_tables, is_xfail, yql_binary_path, yql_source_path


DATA_PATH = yatest.common.source_path('yt/yql/tests/sql/suites')

EXCLUDED_SUITES = [
]

Expand Down Expand Up @@ -181,16 +185,16 @@ def run_test(suite, case, cfg):


def run_file_kqp_no_cache(suite, case, cfg):
config = get_config(suite, case, cfg)
config = get_config(suite, case, cfg, data_path=DATA_PATH)
in_tables = get_tables(suite, config, DATA_PATH, def_attr=KSV_ATTR)[0]

sql_query = get_sql_query('yt', suite, case, config)
sql_query = get_sql_query('yt', suite, case, config, data_path=DATA_PATH)
sql_query = replace_vars(sql_query, "yqlrun_var")

check_provider('yt', config)
validate_sql(sql_query)

if get_parameters_files(suite, config):
if get_parameters_files(suite, config, data_path=DATA_PATH):
pytest.skip('params is not supported in KqpRun')

if get_files(suite, config, DATA_PATH) or get_http_files(suite, config, DATA_PATH):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part0/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part1/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part10/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part11/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part12/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part13/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part14/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part15/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part16/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part17/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part18/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part19/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part2/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part3/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part4/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part5/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part6/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part7/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part8/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down
4 changes: 2 additions & 2 deletions ydb/tests/fq/yt/kqp_yt_file/part9/test.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
import yatest

from kqp_yt_file import run_test
from kqp_yt_file import run_test, DATA_PATH
from test_utils import pytest_generate_tests_for_part
from yql_utils import pytest_get_current_part


def pytest_generate_tests(metafunc):
current_part, part_count = pytest_get_current_part(yatest.common.source_path(__file__))
return pytest_generate_tests_for_part(metafunc, current_part, part_count)
return pytest_generate_tests_for_part(metafunc, current_part, part_count, data_path=DATA_PATH)


def test(suite, case, cfg):
Expand Down

0 comments on commit 916a423

Please sign in to comment.