This commit is contained in:
Tim Bruijnzeels
2019-04-09 17:15:33 +02:00
parent d22fa42a7f
commit 5e00fd99cb
2 changed files with 2 additions and 21 deletions
+2 -4
View File
@@ -14,8 +14,6 @@ use actix_web::middleware::identity::CookieIdentityPolicy;
use actix_web::middleware::identity::IdentityService;
use actix_web::http::{Method, StatusCode};
use bcder::decode;
use krill_cms_proxy::rfc8183;
use krill_cms_proxy::sigmsg::SignedMessage;
use openssl::ssl::{SslMethod, SslAcceptor, SslAcceptorBuilder, SslFiletype};
use crate::krilld::auth;
use crate::krilld::auth::{Authorizer, CheckAuthorisation, Credentials};
@@ -27,7 +25,7 @@ use crate::krilld::krillserver::KrillServer;
use futures::Future;
const LOGIN: &[u8] = include_bytes!("../../../ui/dev/html/login.html");
const NOT_FOUND: &'static [u8] = include_bytes!("../../../ui/public/404.html");
const NOT_FOUND: &[u8] = include_bytes!("../../../ui/public/404.html");
//------------ PubServerApp --------------------------------------------------
@@ -38,7 +36,7 @@ pub struct PubServerApp(App<Arc<RwLock<KrillServer>>>);
///
impl PubServerApp {
pub fn new(server: Arc<RwLock<KrillServer>>) -> Self {
let mut app = App::with_state(server)
let app = App::with_state(server)
.middleware(middleware::Logger::default())
.middleware(IdentityService::new(
CookieIdentityPolicy::new(&[0; 32])
-17
View File
@@ -341,23 +341,6 @@ fn client_publish() {
let token = "secret";
let base_rsync_uri = "rsync://127.0.0.1/repo/carol/";
// Set up a test PubServer Config
let server_conf = {
// Use a data dir for the storage
let data_dir = test::create_sub_dir(&d);
Config::test(&data_dir)
};
// Start the server
thread::spawn(|| {
System::run(move || {
PubServerApp::start(&server_conf);
})
});
// XXX TODO: Find a better way to know the server is ready!
thread::sleep(time::Duration::from_millis(500));
// Add client "carol"
add_publisher(handle, base_rsync_uri, token);