Skip to content

Commit

Permalink
chore: simplify sqlness commands
Browse files Browse the repository at this point in the history
  • Loading branch information
killme2008 committed Apr 29, 2024
1 parent d5d997d commit 746e951
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 48 deletions.
25 changes: 10 additions & 15 deletions tests/cases/distributed/information_schema/cluster_info.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@ DESC TABLE CLUSTER_INFO;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s\s*)+) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO ORDER BY peer_type;

Expand All @@ -32,9 +31,8 @@ SELECT * FROM CLUSTER_INFO ORDER BY peer_type;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'METASRV' ORDER BY peer_type;

Expand All @@ -44,9 +42,8 @@ SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'METASRV' ORDER BY peer_type;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'FRONTEND' ORDER BY peer_type;

Expand All @@ -56,9 +53,8 @@ SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'FRONTEND' ORDER BY peer_type;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'FRONTEND' ORDER BY peer_type;

Expand All @@ -68,9 +64,8 @@ SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'FRONTEND' ORDER BY peer_type;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID > 1 ORDER BY peer_type;

Expand Down
25 changes: 10 additions & 15 deletions tests/cases/distributed/information_schema/cluster_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -6,49 +6,44 @@ DESC TABLE CLUSTER_INFO;
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s\s*)+) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO ORDER BY peer_type;

-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'METASRV' ORDER BY peer_type;

-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'FRONTEND' ORDER BY peer_type;

-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'FRONTEND' ORDER BY peer_type;

-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE unknown UNKNOWN
-- SQLNESS REPLACE (\s\d\.\d\.\d\s) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID > 1 ORDER BY peer_type;

Expand Down
15 changes: 6 additions & 9 deletions tests/cases/standalone/information_schema/cluster_info.result
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,8 @@ DESC TABLE CLUSTER_INFO;
-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO;

Expand All @@ -30,9 +29,8 @@ SELECT * FROM CLUSTER_INFO;
-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'STANDALONE';

Expand All @@ -46,9 +44,8 @@ SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'STANDALONE';
-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID = 0;

Expand Down
15 changes: 6 additions & 9 deletions tests/cases/standalone/information_schema/cluster_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,16 @@ DESC TABLE CLUSTER_INFO;
-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO;

-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'STANDALONE';

Expand All @@ -25,9 +23,8 @@ SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'STANDALONE';
-- SQLNESS REPLACE version node_version
-- SQLNESS REPLACE (\d\.\d\.\d) Version
-- SQLNESS REPLACE (\s[a-z0-9]{7}\s) Hash
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}\s) Start_time
-- SQLNESS REPLACE (\s+uptime\s+) uptime
-- SQLNESS REPLACE (\s+(\d+(s|ms|m)\s)+\s*) Uptime
-- SQLNESS REPLACE (\s[\-0-9T:\.]{23}) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Uptime
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID = 0;

Expand Down

0 comments on commit 746e951

Please sign in to comment.