Skip to content

Commit

Permalink
refactor: [#661] move E2E tests runner mod
Browse files Browse the repository at this point in the history
  • Loading branch information
josecelano committed Jan 30, 2024
1 parent 5b6cf7b commit d8a9f7b
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 10 deletions.
6 changes: 1 addition & 5 deletions src/bin/e2e_tests_runner.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
//! Program to run E2E tests.
//!
//! ```text
//! cargo run --bin e2e_tests_runner share/default/config/tracker.e2e.container.sqlite3.toml
//! ```
use torrust_tracker::e2e;
use torrust_tracker::console::ci::e2e;

fn main() {
e2e::runner::run();
Expand Down
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions src/e2e/mod.rs → src/console/ci/e2e/mod.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
//! E2E tests scripts.
pub mod docker;
pub mod logs_parser;
pub mod runner;
Expand Down
11 changes: 8 additions & 3 deletions src/e2e/runner.rs → src/console/ci/e2e/runner.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,14 @@
//! Program to run E2E tests.
//!
//! ```text
//! cargo run --bin e2e_tests_runner share/default/config/tracker.e2e.container.sqlite3.toml
//! ```
use log::{debug, info, LevelFilter};

use super::tracker_container::TrackerContainer;
use crate::e2e::docker::RunOptions;
use crate::e2e::logs_parser::RunningServices;
use crate::e2e::tracker_checker::{self};
use crate::console::ci::e2e::docker::RunOptions;
use crate::console::ci::e2e::logs_parser::RunningServices;
use crate::console::ci::e2e::tracker_checker::{self};

/* code-review:
- We use always the same docker image name. Should we use a random image name (tag)?
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use rand::Rng;

use super::docker::{RunOptions, RunningContainer};
use super::logs_parser::RunningServices;
use crate::e2e::docker::Docker;
use crate::console::ci::e2e::docker::Docker;

#[derive(Debug)]
pub struct TrackerContainer {
Expand Down
2 changes: 2 additions & 0 deletions src/console/ci/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
//! Continuos integration scripts.
pub mod e2e;
1 change: 1 addition & 0 deletions src/console/clients/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//! Console clients.
3 changes: 3 additions & 0 deletions src/console/mod.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
//! Console apps.
pub mod ci;
pub mod clients;
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -472,8 +472,8 @@
pub mod app;
pub mod bootstrap;
pub mod checker;
pub mod console;

Check warning on line 475 in src/lib.rs

View check run for this annotation

Codecov / codecov/patch

src/lib.rs#L475

Added line #L475 was not covered by tests
pub mod core;
pub mod e2e;
pub mod servers;
pub mod shared;

Expand Down

0 comments on commit d8a9f7b

Please sign in to comment.