Skip to content

Commit

Permalink
remove unused functions
Browse files Browse the repository at this point in the history
Signed-off-by: Rajat Jindal <rajatjindal83@gmail.com>
  • Loading branch information
rajatjindal committed Nov 16, 2023
1 parent 91c4176 commit 9f5ce66
Show file tree
Hide file tree
Showing 7 changed files with 33 additions and 102 deletions.
2 changes: 1 addition & 1 deletion crates/e2e-testing/src/controller.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::metadata_extractor::AppMetadata;
use crate::metadata::AppMetadata;
use anyhow::Result;
use async_trait::async_trait;
use std::process::Output;
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e-testing/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
pub mod asserts;
pub mod controller;
pub mod http_asserts;
pub mod metadata_extractor;
pub mod metadata;
pub mod spin;
pub mod spin_controller;
pub mod testcase;
Expand Down
28 changes: 28 additions & 0 deletions crates/e2e-testing/src/metadata.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
use anyhow::Result;

#[derive(Clone)]
pub struct AppRoute {
pub name: String,
pub route_url: String,
pub wildcard: bool,
}

#[derive(Clone)]
pub struct AppMetadata {
pub name: String,
pub base: String,
pub app_routes: Vec<AppRoute>,
pub version: String,
}

impl AppMetadata {
pub fn get_route_with_name(&self, name: String) -> Result<&AppRoute> {
for route in &self.app_routes {
if route.name == name {
return Ok(route);
}
}

Err("requested route not found").map_err(anyhow::Error::msg)
}
}
97 changes: 0 additions & 97 deletions crates/e2e-testing/src/metadata_extractor.rs

This file was deleted.

2 changes: 1 addition & 1 deletion crates/e2e-testing/src/spin_controller.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::controller::{AppInstance, Controller, ExitedInstance};
use crate::metadata_extractor::AppMetadata;
use crate::metadata::AppMetadata;
use crate::spin;
use crate::utils;
use anyhow::{Context, Result};
Expand Down
2 changes: 1 addition & 1 deletion crates/e2e-testing/src/testcase.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
use crate::controller::Controller;
use crate::metadata_extractor::AppMetadata;
use crate::metadata::AppMetadata;
use crate::spin;
use crate::utils;
use anyhow::{Context, Result};
Expand Down
2 changes: 1 addition & 1 deletion tests/testcases/mod.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use anyhow::Result;
use e2e_testing::controller::Controller;
use e2e_testing::http_asserts::assert_http_response;
use e2e_testing::metadata_extractor::AppMetadata;
use e2e_testing::metadata::AppMetadata;
use e2e_testing::testcase::TestCaseBuilder;
use e2e_testing::{spin, utils};
use hyper::Method;
Expand Down

0 comments on commit 9f5ce66

Please sign in to comment.