summaryrefslogtreecommitdiffstats
path: root/rust/tests/helpers.rs
diff options
context:
space:
mode:
Diffstat (limited to 'rust/tests/helpers.rs')
-rw-r--r--rust/tests/helpers.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/rust/tests/helpers.rs b/rust/tests/helpers.rs
index 677a8855..01891eaf 100644
--- a/rust/tests/helpers.rs
+++ b/rust/tests/helpers.rs
@@ -9,6 +9,10 @@ use iron::{status, Chain, Headers, Iron, Listening};
use iron_test::response;
use std::str::FromStr;
+
+pub static TEST_ADMIN_EDITOR_ID: &str = "aaaaaaaaaaaabkvkaaaaaaaaae";
+//static TEST_ADMIN_EDITOR_ID: FatCatId = FatCatId::from_str("aaaaaaaaaaaabkvkaaaaaaaaae").unwrap();
+
// A current problem with this method is that if the test fails (eg, panics, assert fails), the
// server never gets closed, and the server thread hangs forever.
// One workaround might be to invert the function, take a closure, capture the panic/failure, and
@@ -18,7 +22,7 @@ pub fn setup_client() -> (Client, Context, Listening) {
let server = server::create_test_server().unwrap();
// setup auth as admin user
- let admin_id = FatCatId::from_str("aaaaaaaaaaaabkvkaaaaaaaaae").unwrap();
+ let admin_id = FatCatId::from_str(TEST_ADMIN_EDITOR_ID).unwrap();
let token = server
.auth_confectionary
.create_token(admin_id, None)
@@ -55,7 +59,7 @@ pub fn setup_http() -> (
let conn = server.db_pool.get().expect("db_pool error");
// setup auth as admin user
- let admin_id = FatCatId::from_str("aaaaaaaaaaaabkvkaaaaaaaaae").unwrap();
+ let admin_id = FatCatId::from_str(TEST_ADMIN_EDITOR_ID).unwrap();
let token = server
.auth_confectionary
.create_token(admin_id, None)