Skip to content

Commit 16b58d2

Browse files
authored
release 2.8.28 (#2987)
* nodeunit -> nodeunit-x (+security updates) * avoid tests/plugins failures due to timing issues * bump haraka-net-utils version: fixes #2985
1 parent 7866546 commit 16b58d2

File tree

6 files changed

+38
-34
lines changed

6 files changed

+38
-34
lines changed

Changes.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11

22
## NEXT - 2021-MM-DD
33

4+
5+
## 2.8.28 - 2021-10-14
6+
47
### Changes
58

69
- breaking: dkim.js has changed the constructor opts
@@ -113,6 +116,7 @@
113116
* TLS: don't abort loading certs in config/tls dir when an error is encountered. Process every cert file and then emit errors. #2729
114117
* restore TLS version, correctly #2723
115118

119+
116120
## 2.8.25 - 2019-10-11
117121

118122
### Changes

contrib/plugin2npm.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ if [ -f "tests/plugins/$1.js" ]; then
8383
#!/usr/bin/env node
8484
'use strict'
8585
try {
86-
var reporter = require('nodeunit').reporters.default;
86+
var reporter = require('nodeunit-x').reporters.default;
8787
}
8888
catch (e) {
8989
console.log(`
@@ -102,8 +102,8 @@ reporter.run([ 'test' ], undefined, (err) => {
102102
EO_TEST_RUN
103103

104104
sed -i '' \
105-
-e 's/"_mocha"/"nodeunit"/' \
106-
-e 's/"mocha"/"nodeunit"/' \
105+
-e 's/"_mocha"/"nodeunit-x"/' \
106+
-e 's/"mocha"/"nodeunit-x"/' \
107107
"$PLUGIN_REPO/package.json"
108108

109109
$GIT_CMD add package.json

docs/plugins/queue/smtp_forward.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,4 +122,4 @@ forwarding for specific domains.
122122

123123
# Split host forward routing
124124

125-
When an incoming email transaction has multiple recipients with different forward routes, recipients to subsequent forward routes are deferred. Example: an incoming email transaction has recipients [email protected], [email protected], and [email protected]. The first two messages will be accepted (they share the same forward destination) and the latter one will be deferred. It will arrive in a future delivery attempt by the remote.
125+
When an incoming email transaction has multiple recipients with different forward routes, recipients to subsequent forward routes are deferred. Example: an incoming email transaction has recipients [email protected], [email protected], and [email protected]. The first two recipients will be accepted (they share the same forward destination) and the latter will be deferred. It will arrive in a future delivery attempt by the remote.

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"server",
1010
"email"
1111
],
12-
"version": "2.8.27",
12+
"version": "2.8.28",
1313
"homepage": "http://haraka.github.io",
1414
"repository": {
1515
"type": "git",
@@ -36,7 +36,7 @@
3636
"haraka-config" : "^1.0.20",
3737
"haraka-constants" : "^1.0.5",
3838
"haraka-dsn" : "^1.0.3",
39-
"haraka-net-utils" : "^1.3.0",
39+
"haraka-net-utils" : "^1.3.1",
4040
"haraka-notes" : "^1.0.4",
4141
"haraka-plugin-redis" : "^1.0.12",
4242
"haraka-results" : "^2.0.3",
@@ -69,7 +69,7 @@
6969
"tmp" : "~0.2.1"
7070
},
7171
"devDependencies": {
72-
"nodeunit" : "^0.11",
72+
"nodeunit-x" : "^0.15.0",
7373
"haraka-test-fixtures" : "^1.0.33",
7474
"mock-require" : "^3.0.3",
7575
"eslint" : "^8.0",

run_tests

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
#!/usr/bin/env node
22

3-
"use strict";
3+
'use strict';
4+
45
let reporter;
56
try {
6-
reporter = require('nodeunit').reporters.default;
7+
reporter = require('nodeunit-x').reporters.default;
78
}
89
catch (e) {
910
console.log(`Error: ${e.message}

tests/plugins.js

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
'use strict';
22

3+
process.env.WITHOUT_CONFIG_CACHE=true;
4+
35
const fs = require('fs');
46
const path = require('path');
57
const plugin = require('../plugins');
@@ -46,46 +48,43 @@ exports.plugin = {
4648
}
4749
}
4850

49-
const toPath = path.join('config', `${piName }.timeout`);
50-
51-
const toVals = [ '0', '3', '60', 'apple'];
52-
function getVal () {
53-
return toVals.shift();
54-
}
51+
const toPath = path.join('config', `${piName}.timeout`);
5552

5653
exports.get_timeout = {
57-
setUp (done) {
58-
process.env.WITHOUT_CONFIG_CACHE=true;
59-
this.to = getVal();
60-
const self = this;
61-
fs.writeFile(toPath, this.to, () => {
62-
self.plugin = new plugin.Plugin(piName);
63-
done();
64-
});
65-
},
6654
tearDown : done => {
67-
delete process.env.WITHOUT_CONFIG_CACHE;
6855
fs.unlink(toPath, done);
6956
},
7057
'0s' (test) {
7158
test.expect(1);
72-
test.equal( this.plugin.timeout, this.to );
73-
test.done();
59+
fs.writeFile(toPath, '0', () => {
60+
this.plugin = new plugin.Plugin(piName);
61+
test.equal( this.plugin.timeout, 0 );
62+
test.done();
63+
})
7464
},
7565
'3s' (test) {
7666
test.expect(1);
77-
test.equal( this.plugin.timeout, this.to );
78-
test.done();
67+
fs.writeFile(toPath, '3', () => {
68+
this.plugin = new plugin.Plugin(piName);
69+
test.equal( this.plugin.timeout, 3 );
70+
test.done();
71+
})
7972
},
8073
'60s' (test) {
8174
test.expect(1);
82-
test.equal( this.plugin.timeout, this.to );
83-
test.done();
75+
fs.writeFile(toPath, '60', () => {
76+
this.plugin = new plugin.Plugin(piName);
77+
test.equal( this.plugin.timeout, 60 );
78+
test.done();
79+
})
8480
},
85-
'30s default (overrides NaN apple)' (test) {
81+
'30s default (overrides NaN)' (test) {
8682
test.expect(1);
87-
test.equal( this.plugin.timeout, 30 );
88-
test.done();
83+
fs.writeFile(toPath, 'apple', () => {
84+
this.plugin = new plugin.Plugin(piName);
85+
test.equal( this.plugin.timeout, 30 );
86+
test.done();
87+
})
8988
},
9089
}
9190

0 commit comments

Comments
 (0)