-
Notifications
You must be signed in to change notification settings - Fork 127
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
Add Template Provider to integration test project #1156
Add Template Provider to integration test project #1156
Conversation
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
Bencher
🚨 1 ALERT: Threshold Boundary Limit exceeded!
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
9a4bd36
to
5d5db7d
Compare
fn download_bitcoind_tarball(download_url: &str) -> Vec<u8> { | ||
let response = minreq::get(download_url) | ||
.send() | ||
.expect(&format!("Cannot reach URL: {}", download_url)); | ||
assert_eq!( | ||
response.status_code, 200, | ||
"URL {} didn't return 200", | ||
download_url | ||
); | ||
response.as_bytes().to_vec() | ||
} | ||
|
||
fn read_tarball_from_file(path: &str) -> Vec<u8> { | ||
let file = File::open(path).expect(&format!( | ||
"Cannot find {:?} specified with env var BITCOIND_TARBALL_FILE", | ||
path | ||
)); | ||
let mut reader = BufReader::new(file); | ||
let mut buffer = Vec::new(); | ||
reader.read_to_end(&mut buffer).unwrap(); | ||
buffer | ||
} | ||
|
||
fn unpack_tarball(tarball_bytes: &[u8], destination: &Path) { | ||
let decoder = GzDecoder::new(tarball_bytes); | ||
let mut archive = Archive::new(decoder); | ||
for mut entry in archive.entries().unwrap().flatten() { | ||
if let Ok(file) = entry.path() { | ||
if file.ends_with("bitcoind") { | ||
entry.unpack_in(destination).unwrap(); | ||
} | ||
} | ||
} | ||
} | ||
|
||
fn get_bitcoind_filename(os: &str, arch: &str) -> String { | ||
match (os, arch) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we move these to a separate utils module?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was my initial though as well. But I think we should wait a bit and see if those functions are gonna be used by other roles, otherwise they really should be part of the TemplateProvier
module in tests::common::mod::TemplateProvider
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that makes sense. I don't think these utility methods will be used anywhere else except here. Let's keep them here for now, and if we find that another module uses them, we can move them to a separate utility module.
0193c09
to
c0786f9
Compare
Bencher Report
🚨 1 ALERT: Threshold Boundary Limit exceeded!
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Bencher Report
Click to view all benchmark results
|
Bencher
Click to view all benchmark results
Bencher - Continuous Benchmarking View Public Perf Page Docs | Repo | Chat | Help |
c0786f9
to
eaebb86
Compare
This enables running multiple TP's across different tests simultaneously.
eaebb86
to
8c8b687
Compare
Rebased without further changes |
blocked by #1155