Skip to content

Commit

Permalink
fix(ci): remove sqlness state in success (#4313)
Browse files Browse the repository at this point in the history
* fix(ci): remove sqlness state in success

Signed-off-by: Ruihang Xia <[email protected]>

* fix regex

Signed-off-by: Ruihang Xia <[email protected]>

---------

Signed-off-by: Ruihang Xia <[email protected]>
Co-authored-by: dennis zhuang <[email protected]>
  • Loading branch information
waynexia and killme2008 authored Jul 8, 2024
1 parent 8e69543 commit 9686113
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 13 deletions.
10 changes: 5 additions & 5 deletions tests/cases/standalone/information_schema/cluster_info.result
Original file line number Diff line number Diff line change
Expand Up @@ -20,22 +20,22 @@ 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO;

+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|0|STANDALONE||Version|Hash|Start_time|Duration||+++++++++
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|Start_time|STANDALONE||Version|Hash|Start_time|Start_timems||+++++++++

-- 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'STANDALONE';

+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|0|STANDALONE||Version|Hash|Start_time|Duration||+++++++++
+++++++++|peer_id|peer_type|peer_addr|node_version|git_commit|start_time|uptime|active_time|+++++++++|Start_time|STANDALONE||Version|Hash|Start_time|Start_timems||+++++++++

SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE != 'STANDALONE';

Expand All @@ -45,7 +45,7 @@ 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID = 0;
Expand Down
6 changes: 3 additions & 3 deletions tests/cases/standalone/information_schema/cluster_info.sql
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_TYPE = 'STANDALONE';
Expand All @@ -23,7 +23,7 @@ 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}) Start_time
-- SQLNESS REPLACE (\s[\-0-9T:\.]+) Start_time
-- SQLNESS REPLACE ((\d+(s|ms|m)\s)+) Duration
-- SQLNESS REPLACE [\s\-]+
SELECT * FROM CLUSTER_INFO WHERE PEER_ID = 0;
Expand Down
11 changes: 6 additions & 5 deletions tests/runner/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ async fn main() {
.prefix("sqlness")
.tempdir()
.unwrap();
let data_home = temp_dir.path().to_path_buf();
let data_home = temp_dir.into_path();

let config = ConfigBuilder::default()
.case_dir(util::get_case_dir(args.case_dir))
Expand All @@ -107,12 +107,13 @@ async fn main() {

let runner = Runner::new(
config,
Env::new(data_home, args.server_addr, wal, args.bins_dir),
Env::new(data_home.clone(), args.server_addr, wal, args.bins_dir),
);
runner.run().await.unwrap();

// skip clean up and exit
if args.preserve_state {
println!("Preserving state in {:?}", temp_dir.into_path());
// clean up and exit
if !args.preserve_state {
println!("Removing state in {:?}", data_home);
tokio::fs::remove_dir_all(data_home).await.unwrap();
}
}

0 comments on commit 9686113

Please sign in to comment.