Skip to content
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

remove unused e2e testing functions #2100

Merged
merged 1 commit into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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