forked from ydb-platform/ydb
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refuse empty query text (ydb-platform#708)
* Refuse empty query text * flake8 * Fix tests
- Loading branch information
Showing
4 changed files
with
31 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
|
||
import pytest | ||
|
||
import ydb.public.api.protos.draft.fq_pb2 as fq | ||
|
||
from ydb.tests.tools.fq_runner.fq_client import FederatedQueryException | ||
from ydb.tests.tools.fq_runner.kikimr_utils import yq_all | ||
|
||
|
||
class TestS3(object): | ||
|
||
@yq_all | ||
@pytest.mark.parametrize("client", [{"folder_id": "my_folder"}], indirect=True) | ||
def test_empty(self, kikimr, client): | ||
try: | ||
client.create_query("simple", "", type=fq.QueryContent.QueryType.ANALYTICS).result.query_id | ||
except FederatedQueryException as e: | ||
assert "message: \"text\\\'s length is not in [1; 102400]" in e.args[0] | ||
return | ||
assert False | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters