This commit is contained in:
parent
6ebf0f1776
commit
66655cb8b0
39
.drone.yml
Normal file
39
.drone.yml
Normal file
@ -0,0 +1,39 @@
|
||||
---
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
steps:
|
||||
- name: fetch_dependencies
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
commands:
|
||||
- cargo fetch
|
||||
|
||||
- name: code_quality
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
depends_on:
|
||||
- fetch_dependencies
|
||||
commands:
|
||||
- rustup component add clippy
|
||||
- cargo clippy -- -D warnings
|
||||
|
||||
- name: test
|
||||
image: rust
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
path: /usr/local/cargo/registry
|
||||
depends_on:
|
||||
- code_quality
|
||||
commands:
|
||||
- cargo test
|
||||
|
||||
volumes:
|
||||
- name: rust_registry
|
||||
temp: {}
|
||||
|
986
Cargo.lock
generated
986
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -1,11 +1,11 @@
|
||||
[package]
|
||||
name = "victim_client"
|
||||
version = "0.1.0"
|
||||
edition = "2021"
|
||||
edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
clap = { version = "4.5.16", features = ["derive"] }
|
||||
log = "0.4.22"
|
||||
env_logger = "0.11.5"
|
||||
reqwest = "0.12.5"
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
tokio = { version = "1", features = ["full"] }
|
||||
|
4
renovate.json
Normal file
4
renovate.json
Normal file
@ -0,0 +1,4 @@
|
||||
{
|
||||
"extends": ["local>renovate/presets"]
|
||||
}
|
||||
|
15
src/main.rs
15
src/main.rs
@ -32,15 +32,22 @@ async fn main() -> Result<(), Box<dyn std::error::Error>> {
|
||||
.await;
|
||||
|
||||
match res {
|
||||
Err(e) =>
|
||||
log::error!("Failed to perform request: {e}"),
|
||||
Err(e) => log::error!("Failed to perform request: {e}"),
|
||||
Ok(res) => {
|
||||
log::info!("Response status: {}", res.status());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
std::thread::sleep(Duration::from_secs(args.pause_between_requests as u64));
|
||||
}
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
mod test {
|
||||
use crate::Args;
|
||||
#[test]
|
||||
fn verify_cli() {
|
||||
use clap::CommandFactory;
|
||||
Args::command().debug_assert()
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user