Skip to content

Commit

Permalink
golem-ui: add test-r as a dev-dependency and enable testing in lib.rs…
Browse files Browse the repository at this point in the history
…; remove main.rs
  • Loading branch information
Myestery committed Dec 16, 2024
1 parent 5545c08 commit b35018b
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 30 deletions.
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions golem-ui-service/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ clap = { version = "4.0", features = ["derive"] }
[build-dependencies]
embed-resource = "3.0.1"

[dev-dependencies]
test-r = { workspace = true }

[lib]
harness = false
17 changes: 3 additions & 14 deletions golem-ui-service/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
#[cfg(test)]
test_r::enable!();

use axum::{
body::{Body, Bytes},
extract::State,
Expand Down Expand Up @@ -205,17 +208,3 @@ impl UiService {
Ok(())
}
}

#[tokio::main]
pub async fn main() {
let args = CliArgs::parse();

let res = UiService::new(args)
.run()
.await;

match res {
Err(e) => println!("Error starting UI: {}", e),
Ok(_) => println!("UI Server stopped"),
}
}
16 changes: 0 additions & 16 deletions golem-ui-service/src/main.rs

This file was deleted.

0 comments on commit b35018b

Please sign in to comment.