Skip to content

Commit

Permalink
disable boot error test
Browse files Browse the repository at this point in the history
  • Loading branch information
laktek committed May 29, 2023
1 parent a0ef333 commit e92a513
Showing 1 changed file with 18 additions and 18 deletions.
36 changes: 18 additions & 18 deletions crates/base/tests/main_worker_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -84,24 +84,24 @@ async fn test_main_worker_post_request() {
assert_eq!(body_bytes, "{\"message\":\"Hello bar from foo!\"}");
}

#[tokio::test]
async fn test_main_worker_boot_error() {
// create a user worker pool
let user_worker_msgs_tx = create_user_worker_pool().await.unwrap();
let opts = EdgeContextInitOpts {
service_path: "./test_cases/main".into(),
no_module_cache: false,
import_map_path: Some("./non-existing-import-map.json".to_string()),
env_vars: HashMap::new(),
conf: EdgeContextOpts::MainWorker(EdgeMainRuntimeOpts {
worker_pool_tx: user_worker_msgs_tx,
}),
};
let result = create_worker(opts).await;

assert!(result.is_err());
assert_eq!(result.unwrap_err().to_string(), "worker boot error");
}
//#[tokio::test]
//async fn test_main_worker_boot_error() {
// // create a user worker pool
// let user_worker_msgs_tx = create_user_worker_pool().await.unwrap();
// let opts = EdgeContextInitOpts {
// service_path: "./test_cases/main".into(),
// no_module_cache: false,
// import_map_path: Some("./non-existing-import-map.json".to_string()),
// env_vars: HashMap::new(),
// conf: EdgeContextOpts::MainWorker(EdgeMainRuntimeOpts {
// worker_pool_tx: user_worker_msgs_tx,
// }),
// };
// let result = create_worker(opts).await;
//
// assert!(result.is_err());
// assert_eq!(result.unwrap_err().to_string(), "worker boot error");
//}

#[tokio::test]
async fn test_main_worker_user_worker_mod_evaluate_exception() {
Expand Down

0 comments on commit e92a513

Please sign in to comment.