Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix - tck contains is invalid #3314

Merged
merged 9 commits into from
Nov 26, 2021
1 change: 1 addition & 0 deletions tests/common/comparator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ def s(self, b: bytes) -> str:

def _whether_return(self, cmp: bool) -> bool:
return ((self._contains == CmpType.EQUAL and not cmp)
or (self._contains == CmpType.CONTAINS and not cmp)
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
or (self._contains == CmpType.NOT_CONTAINS and cmp))

def compare(self, resp: DataSet, expect: DataSet):
Expand Down
7 changes: 4 additions & 3 deletions tests/tck/features/admin/Hosts.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Copyright (c) 2021 vesoft inc. All rights reserved.
#
# This source code is licensed under Apache 2.0 License.
@li
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
Feature: Admin hosts

Scenario: Show hosts
Expand All @@ -17,21 +18,21 @@ Feature: Admin hosts
"""
Then the result should contain:
| Host | Port | Status | Role | Git Info Sha | Version |
| /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | EMPTY |
| /\w+/ | /\d+/ | "ONLINE" | "GRAPH" | /[0-9a-f]{7}/ | '' |
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
When executing query:
"""
SHOW HOSTS META;
"""
Then the result should contain:
| Host | Port | Status | Role | Git Info Sha | Version |
| /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | EMPTY |
| /\w+/ | /\d+/ | "ONLINE" | "META" | /[0-9a-f]{7}/ | '' |
When executing query:
"""
SHOW HOSTS STORAGE;
"""
Then the result should contain:
| Host | Port | Status | Role | Git Info Sha | Version |
| /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | EMPTY |
| /\w+/ | /\d+/ | "ONLINE" | "STORAGE" | /[0-9a-f]{7}/ | '' |

Scenario: Create space
When executing query:
Expand Down
44 changes: 20 additions & 24 deletions tests/tck/features/index/TagEdgeIndex.feature
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ Feature: tag and edge index tests from pytest
CREATE TAG tag_1(col1 string, col2 int, col3 double, col4 timestamp);
CREATE EDGE edge_1(col1 string, col2 int, col3 double, col4 timestamp);
INSERT VERTEX
tag_1(col1, col2, col3, col4)
tag_1(col1, col2, col3, col4)
VALUES
'101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')),
'102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')),
'103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00'));
'101':('Tom', 18, 35.4, `timestamp`('2010-09-01T08:00:00')),
'102':('Jerry', 22, 38.4, `timestamp`('2011-09-01T08:00:00')),
'103':('Bob', 19, 36.4, `timestamp`('2010-09-01T12:00:00'));
INSERT EDGE
edge_1(col1, col2, col3, col4)
edge_1(col1, col2, col3, col4)
VALUES
'101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')),
'102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')),
'103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00'));
'101'->'102':('Red', 81, 45.3, `timestamp`('2010-09-01T08:00:00')),
'102'->'103':('Yellow', 22, 423.8, `timestamp`('2011-09-01T08:00:00')),
'103'->'101':('Blue', 91, 43.1, `timestamp`('2010-09-01T12:00:00'));
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
"""

Scenario: test tag index from pytest
Expand Down Expand Up @@ -96,10 +96,8 @@ Feature: tag and edge index tests from pytest
SHOW TAG INDEX STATUS
"""
Then the result should contain:
| Name | Index Status |
| 'single_tag_index' | 'FINISHED' |
| 'multi_tag_index' | 'FINISHED' |
| 'disorder_tag_index' | 'FINISHED' |
| Name | Index Status |
| 'single_tag_index,multi_tag_index,disorder_tag_index' | 'FINISHED' |
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
When executing query:
"""
LOOKUP ON tag_1 WHERE tag_1.col2 == 18 YIELD tag_1.col1
Expand Down Expand Up @@ -172,8 +170,8 @@ Feature: tag and edge index tests from pytest
When executing query:
"""
CREATE TAG INDEX `multi_tag_index` ON `tag_1` (
`col2`,
`col3`
`col2`,
`col3`
heroicNeZha marked this conversation as resolved.
Show resolved Hide resolved
)
"""
Then the execution should be successful
Expand All @@ -192,8 +190,8 @@ Feature: tag and edge index tests from pytest
When executing query:
"""
CREATE TAG INDEX `disorder_tag_index` ON `tag_1` (
`col3`,
`col2`
`col3`,
`col2`
)
"""
Then the execution should be successful
Expand Down Expand Up @@ -333,10 +331,8 @@ Feature: tag and edge index tests from pytest
SHOW EDGE INDEX STATUS
"""
Then the result should contain:
| Name | Index Status |
| 'single_edge_index' | 'FINISHED' |
| 'multi_edge_index' | 'FINISHED' |
| 'disorder_edge_index' | 'FINISHED' |
| Name | Index Status |
| 'single_edge_index,multi_edge_index,disorder_edge_index' | 'FINISHED' |
# Lookup
When executing query:
"""
Expand Down Expand Up @@ -418,8 +414,8 @@ Feature: tag and edge index tests from pytest
When executing query:
"""
CREATE EDGE INDEX `multi_edge_index` ON `edge_1` (
`col2`,
`col3`
`col2`,
`col3`
)
"""
Then the execution should be successful
Expand All @@ -439,8 +435,8 @@ Feature: tag and edge index tests from pytest
When executing query:
"""
CREATE EDGE INDEX `disorder_edge_index` ON `edge_1` (
`col3`,
`col2`
`col3`,
`col2`
)
"""
Then the execution should be successful
Expand Down