Skip to content

Commit

Permalink
fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
imor committed Sep 30, 2024
1 parent 4a064bb commit 0b953ff
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion api/tests/api/health_check.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ async fn health_check_works() {

// Act
let response = client
.get(&format!("{}/health_check", app.address))
.get(format!("{}/health_check", app.address))
.send()
.await
.expect("Failed to execute request.");
Expand Down
50 changes: 25 additions & 25 deletions api/tests/api/test_app.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub struct UpdateImageRequest {
impl TestApp {
pub async fn create_tenant(&self, tenant: &CreateTenantRequest) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/tenants", &self.address))
.post(format!("{}/v1/tenants", &self.address))
.json(tenant)
.send()
.await
Expand All @@ -149,7 +149,7 @@ impl TestApp {

pub async fn read_tenant(&self, tenant_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/tenants/{tenant_id}", &self.address))
.get(format!("{}/v1/tenants/{tenant_id}", &self.address))
.send()
.await
.expect("failed to execute request")
Expand All @@ -161,7 +161,7 @@ impl TestApp {
tenant: &UpdateTenantRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/tenants/{tenant_id}", &self.address))
.post(format!("{}/v1/tenants/{tenant_id}", &self.address))
.json(tenant)
.send()
.await
Expand All @@ -170,15 +170,15 @@ impl TestApp {

pub async fn delete_tenant(&self, tenant_id: i64) -> reqwest::Response {
self.api_client
.delete(&format!("{}/v1/tenants/{tenant_id}", &self.address))
.delete(format!("{}/v1/tenants/{tenant_id}", &self.address))
.send()
.await
.expect("Failed to execute request.")
}

pub async fn read_all_tenants(&self) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/tenants", &self.address))
.get(format!("{}/v1/tenants", &self.address))
.send()
.await
.expect("failed to execute request")
Expand All @@ -190,7 +190,7 @@ impl TestApp {
source: &CreateSourceRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/sources", &self.address))
.post(format!("{}/v1/sources", &self.address))
.header("tenant_id", tenant_id)
.json(source)
.send()
Expand All @@ -200,7 +200,7 @@ impl TestApp {

pub async fn read_source(&self, tenant_id: i64, source_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/sources/{source_id}", &self.address))
.get(format!("{}/v1/sources/{source_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -214,7 +214,7 @@ impl TestApp {
source: &UpdateSourceRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/sources/{source_id}", &self.address))
.post(format!("{}/v1/sources/{source_id}", &self.address))
.header("tenant_id", tenant_id)
.json(source)
.send()
Expand All @@ -224,7 +224,7 @@ impl TestApp {

pub async fn delete_source(&self, tenant_id: i64, source_id: i64) -> reqwest::Response {
self.api_client
.delete(&format!("{}/v1/sources/{source_id}", &self.address))
.delete(format!("{}/v1/sources/{source_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -233,7 +233,7 @@ impl TestApp {

pub async fn read_all_sources(&self, tenant_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/sources", &self.address))
.get(format!("{}/v1/sources", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -242,7 +242,7 @@ impl TestApp {

pub async fn create_sink(&self, tenant_id: i64, sink: &CreateSinkRequest) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/sinks", &self.address))
.post(format!("{}/v1/sinks", &self.address))
.header("tenant_id", tenant_id)
.json(sink)
.send()
Expand All @@ -252,7 +252,7 @@ impl TestApp {

pub async fn read_sink(&self, tenant_id: i64, sink_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/sinks/{sink_id}", &self.address))
.get(format!("{}/v1/sinks/{sink_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -266,7 +266,7 @@ impl TestApp {
sink: &UpdateSinkRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/sinks/{sink_id}", &self.address))
.post(format!("{}/v1/sinks/{sink_id}", &self.address))
.header("tenant_id", tenant_id)
.json(sink)
.send()
Expand All @@ -276,7 +276,7 @@ impl TestApp {

pub async fn delete_sink(&self, tenant_id: i64, sink_id: i64) -> reqwest::Response {
self.api_client
.delete(&format!("{}/v1/sinks/{sink_id}", &self.address))
.delete(format!("{}/v1/sinks/{sink_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -285,7 +285,7 @@ impl TestApp {

pub async fn read_all_sinks(&self, tenant_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/sinks", &self.address))
.get(format!("{}/v1/sinks", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -298,7 +298,7 @@ impl TestApp {
pipeline: &CreatePipelineRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/pipelines", &self.address))
.post(format!("{}/v1/pipelines", &self.address))
.header("tenant_id", tenant_id)
.json(pipeline)
.send()
Expand All @@ -308,7 +308,7 @@ impl TestApp {

pub async fn read_pipeline(&self, tenant_id: i64, pipeline_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.get(format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -322,7 +322,7 @@ impl TestApp {
pipeline: &UpdatePipelineRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.post(format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.header("tenant_id", tenant_id)
.json(pipeline)
.send()
Expand All @@ -332,7 +332,7 @@ impl TestApp {

pub async fn delete_pipeline(&self, tenant_id: i64, pipeline_id: i64) -> reqwest::Response {
self.api_client
.delete(&format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.delete(format!("{}/v1/pipelines/{pipeline_id}", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -341,7 +341,7 @@ impl TestApp {

pub async fn read_all_pipelines(&self, tenant_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/pipelines", &self.address))
.get(format!("{}/v1/pipelines", &self.address))
.header("tenant_id", tenant_id)
.send()
.await
Expand All @@ -350,7 +350,7 @@ impl TestApp {

pub async fn create_image(&self, image: &CreateImageRequest) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/images", &self.address))
.post(format!("{}/v1/images", &self.address))
.json(image)
.send()
.await
Expand All @@ -359,7 +359,7 @@ impl TestApp {

pub async fn read_image(&self, image_id: i64) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/images/{image_id}", &self.address))
.get(format!("{}/v1/images/{image_id}", &self.address))
.send()
.await
.expect("failed to execute request")
Expand All @@ -371,7 +371,7 @@ impl TestApp {
image: &UpdateImageRequest,
) -> reqwest::Response {
self.api_client
.post(&format!("{}/v1/images/{image_id}", &self.address))
.post(format!("{}/v1/images/{image_id}", &self.address))
.json(image)
.send()
.await
Expand All @@ -380,15 +380,15 @@ impl TestApp {

pub async fn delete_image(&self, image_id: i64) -> reqwest::Response {
self.api_client
.delete(&format!("{}/v1/images/{image_id}", &self.address))
.delete(format!("{}/v1/images/{image_id}", &self.address))
.send()
.await
.expect("Failed to execute request.")
}

pub async fn read_all_images(&self) -> reqwest::Response {
self.api_client
.get(&format!("{}/v1/images", &self.address))
.get(format!("{}/v1/images", &self.address))
.send()
.await
.expect("failed to execute request")
Expand Down

0 comments on commit 0b953ff

Please sign in to comment.