Skip to content

Commit

Permalink
fix: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
titanism committed Sep 2, 2024
1 parent d393c81 commit 6083cca
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 17 deletions.
19 changes: 9 additions & 10 deletions helpers/on-data-mx.js
Original file line number Diff line number Diff line change
Expand Up @@ -278,20 +278,19 @@ async function onDataMX(raw, session, headers, body) {
)
return;

console.log('WIP');

// TODO: add opt-in logging in Domain > Settings and log for each if enabled
// logger.info('email processed', {
// // TODO: session.headers etc need set (see createSession)
// TODO: log here
// logger.info('email delivery attempt', {
// session,
// // TODO: figure this out
// // user: email.user,
// // email: email._id,
// // domains: [email.domain],
// ignore_hook: false
// });
// TODO: send email here and log "email delivered" (or) "email forwarded"

// Buffer.concat([
// Buffer.from(session.arcSealedHeaders),
// headers.build(),
// body
// ]);

// TODO: send email here and log "email delivered" (or) "email forwarded"
// TODO: fill this in
}

Expand Down
8 changes: 2 additions & 6 deletions test/api/v1.js
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,6 @@ test('creates alias with global catch-all', async (t) => {
t.deepEqual(
_.sortBy(Object.keys(res.body)),
_.sortBy([
'max_quota',
'created_at',
'error_code_if_disabled',
'has_imap',
Expand Down Expand Up @@ -210,6 +209,7 @@ test('creates alias with global catch-all', async (t) => {
t.deepEqual(
_.sortBy(Object.keys(res.body.user)),
_.sortBy([
'max_quota_per_alias',
'address_country',
'address_html',
'created_at',
Expand All @@ -219,7 +219,6 @@ test('creates alias with global catch-all', async (t) => {
'id',
'last_locale',
'locale',
'max_quota_per_alias',
'object',
'otp_enabled',
'plan',
Expand All @@ -230,7 +229,7 @@ test('creates alias with global catch-all', async (t) => {
t.deepEqual(
_.sortBy(Object.keys(res.body.domain)),
_.sortBy([
'max_quota_per_alias',
'max_recipients_per_alias',
'allowlist',
'denylist',
'invites',
Expand All @@ -252,7 +251,6 @@ test('creates alias with global catch-all', async (t) => {
'ignore_mx_check',
'is_catchall_regex_disabled',
'locale',
'max_recipients_per_alias',
'members',
'name',
'object',
Expand Down Expand Up @@ -302,7 +300,6 @@ test('creates alias with global catch-all', async (t) => {
'retention',
'name',
'is_enabled',
'max_quota',
'error_code_if_disabled',
'has_recipient_verification',
'recipients',
Expand Down Expand Up @@ -1288,7 +1285,6 @@ test('create domain without catchall', async (t) => {
t.deepEqual(
_.sortBy(Object.keys(res.body[0])),
_.sortBy([
'max_quota_per_alias',
'allowlist',
'denylist',
'created_at',
Expand Down
2 changes: 1 addition & 1 deletion test/smtp/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,7 @@ test(`${env.SMTP_MESSAGE_MAX_SIZE} message size`, async (t) => {
user: user._id
})
);
t.is(err.message, `Email size of ${env.SMTP_MESSAGE_MAX_SIZE} exceeded.`);
t.is(err.message, `Email size of ${bytes(bytes(env.SMTP_MESSAGE_MAX_SIZE))} exceeded.`);
});

test('smtp outbound queue', async (t) => {
Expand Down

0 comments on commit 6083cca

Please sign in to comment.