-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add tck test cases for session (#3486)
* add session cases clear parameter fix client ip * fix parser * wait more time
- Loading branch information
Showing
3 changed files
with
86 additions
and
0 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,33 @@ | ||
# Copyright (c) 2021 vesoft inc. All rights reserved. | ||
# | ||
# This source code is licensed under Apache 2.0 License. | ||
Feature: Test sessions | ||
|
||
Background: | ||
Given a nebulacluster with 3 graphd and 1 metad and 1 storaged | ||
|
||
Scenario: Show sessions | ||
When executing query: | ||
""" | ||
SHOW SESSIONS; | ||
""" | ||
Then the result should contain: | ||
| SessionId | UserName | SpaceName | CreateTime | UpdateTime | GraphAddr | Timezone | ClientIp | | ||
| /\d+/ | "root" | "" | /.*/ | /.*/ | /.*/ | 0 | "127.0.0.1" | | ||
When executing query: | ||
""" | ||
CREATE USER user1 WITH PASSWORD 'nebula1'; | ||
CREATE SPACE s1(vid_type=int); | ||
USE s1; | ||
""" | ||
Then the execution should be successful | ||
And wait 3 seconds | ||
When login "graphd[1]" with "user1" and "nebula1" | ||
And executing query: | ||
""" | ||
SHOW SESSIONS; | ||
""" | ||
Then the result should contain, replace the holders with cluster info: | ||
| SessionId | UserName | SpaceName | CreateTime | UpdateTime | GraphAddr | Timezone | ClientIp | | ||
| /\d+/ | "root" | "s1" | /.*/ | /.*/ | "127.0.0.1:${cluster.graphd_processes[0].tcp_port}" | 0 | "127.0.0.1" | | ||
| /\d+/ | "user1" | "" | /.*/ | /.*/ | "127.0.0.1:${cluster.graphd_processes[1].tcp_port}" | 0 | "127.0.0.1" | |