mod mock_service;
macro_rules! mock_service {
($config:ident, $addr:expr, $port:expr) => {{
let config = format!(
r#"
[mock-service.addr]
ip = "{}"
port = {}
"#,
$addr, $port
);
::std::fs::write($config.clone(), config).unwrap();
let config_thread = $config.to_string_lossy().to_string();
::std::thread::spawn(|| {
Service::new(
ServiceConfig::new_from_path("mock-service", config_thread).unwrap(),
Subsystem,
QueryRoot,
MutationRoot,
)
.start()
});
::std::thread::sleep(::std::time::Duration::from_millis(100));
}};
}
mod query;