Access token permissions
This commit is contained in:
@@ -14,8 +14,8 @@ use crate::smtp::{
|
||||
|
||||
#[tokio::test]
|
||||
async fn basic_commands() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let mut session = Session::test(build_smtp(Core::default(), Inner::default()));
|
||||
|
||||
|
||||
@@ -92,8 +92,8 @@ verify = [{if = "sender_domain = 'test.net'", then = 'relaxed'},
|
||||
|
||||
#[tokio::test]
|
||||
async fn dmarc() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let mut inner = Inner::default();
|
||||
let tmp_dir = TempDir::new("smtp_dmarc_test", true);
|
||||
|
||||
@@ -38,8 +38,8 @@ ehlo = [{if = "remote_ip = '10.0.0.2'", then = 'strict'},
|
||||
|
||||
#[tokio::test]
|
||||
async fn ehlo() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let mut config = Config::new(CONFIG).unwrap();
|
||||
let core = Core::parse(&mut config, Default::default(), Default::default()).await;
|
||||
|
||||
@@ -29,8 +29,8 @@ duration = [{if = "remote_ip = '10.0.0.3'", then = '500ms'},
|
||||
|
||||
#[tokio::test]
|
||||
async fn limits() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let mut config = Config::new(CONFIG).unwrap();
|
||||
let core = Core::parse(&mut config, Default::default(), Default::default()).await;
|
||||
|
||||
@@ -69,7 +69,6 @@ async fn address_rewrite() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Prepare config
|
||||
let mut config = Config::new(CONFIG).unwrap();
|
||||
let core = Core::parse(&mut config, Default::default(), Default::default()).await;
|
||||
|
||||
@@ -49,8 +49,8 @@ ip-strategy = "ipv6_then_ipv4"
|
||||
|
||||
#[tokio::test]
|
||||
async fn lookup_ip() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let ipv6 = [
|
||||
"a:b::1".parse().unwrap(),
|
||||
|
||||
@@ -69,7 +69,6 @@ async fn manage_queue() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start remote test server
|
||||
let mut remote = TestServer::new("smtp_manage_queue_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -57,7 +57,6 @@ async fn manage_reports() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start reporting service
|
||||
let local = TestServer::new("smtp_manage_reports", CONFIG, true).await;
|
||||
let _rx = local.start(&[ServerProtocol::Http]).await;
|
||||
|
||||
@@ -85,7 +85,6 @@ async fn dane_verify() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_dane_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -53,7 +53,6 @@ async fn extensions() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_ext_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -54,7 +54,6 @@ async fn fallback_relay() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_fallback_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -33,7 +33,6 @@ async fn ip_lookup_strategy() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_iplookup_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -65,7 +65,6 @@ async fn lmtp_delivery() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("lmtp_delivery_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Lmtp]).await;
|
||||
|
||||
@@ -62,7 +62,6 @@ async fn mta_sts_verify() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_mta_sts_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -73,7 +73,6 @@ async fn smtp_delivery() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_delivery_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -69,7 +69,6 @@ async fn throttle_outbound() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Build test message
|
||||
let mut test_message = new_message(0);
|
||||
test_message.return_path_domain = "foobar.org".to_string();
|
||||
|
||||
@@ -46,7 +46,6 @@ async fn starttls_optional() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Start test server
|
||||
let mut remote = TestServer::new("smtp_starttls_remote", REMOTE, true).await;
|
||||
let _rx = remote.start(&[ServerProtocol::Smtp]).await;
|
||||
|
||||
@@ -34,8 +34,8 @@ sign = "['rsa']"
|
||||
|
||||
#[tokio::test]
|
||||
async fn generate_dsn() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let mut path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||
path.push("resources");
|
||||
|
||||
@@ -23,8 +23,8 @@ relay = true
|
||||
|
||||
#[tokio::test]
|
||||
async fn queue_due() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
let local = TestServer::new("smtp_queue_due_test", CONFIG, true).await;
|
||||
let core = local.build_smtp();
|
||||
|
||||
@@ -38,7 +38,6 @@ async fn queue_retry() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
|
||||
// Create temp dir for queue
|
||||
let mut local = TestServer::new("smtp_queue_retry_test", CONFIG, true).await;
|
||||
|
||||
|
||||
@@ -28,8 +28,8 @@ store = "1s"
|
||||
|
||||
#[tokio::test(flavor = "multi_thread")]
|
||||
async fn report_analyze() {
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
// Enable logging
|
||||
crate::enable_logging();
|
||||
|
||||
// Create temp dir for queue
|
||||
let mut local = TestServer::new("smtp_analyze_report_test", CONFIG, true).await;
|
||||
|
||||
Reference in New Issue
Block a user