Skip to content

Commit f7e7091

Browse files
committedJun 30, 2023
use got instead of axios, some cleanup, problem with async context being lost for logging
1 parent 02d9e6e commit f7e7091

15 files changed

+512
-729
lines changed
 

‎config/default.js

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const defaultOptions = {
6060
},
6161

6262
communication: {
63+
requestTimeoutMs: 120000,
6364
strictTopicHubLink: true, // If true, deletes topics which do not list us (dingus.selfBaseUrl) as a hub relation.
6465
retryBackoffSeconds: [60, 120, 360, 1440, 7200, 43200, 86400], // failed requests retry according to number of attempts
6566
claimTimeoutSeconds: 600, // how long until an in-progress task is deemed abandoned

‎package-lock.json

+103-249
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@
3737
"@squeep/html-template-helper": "git+https://git.squeep.com/squeep-html-template-helper#v1.4.0",
3838
"@squeep/logger-json-console": "^2.0.1",
3939
"@squeep/web-linking": "^1.0.8",
40-
"axios": "^1.4.0",
4140
"feedparser": "^2.2.10",
41+
"got": "^13.0.0",
4242
"htmlparser2": "^9.0.0",
4343
"iconv": "^3.0.1"
4444
},
@@ -47,7 +47,7 @@
4747
"pg-promise": "^11.5.0"
4848
},
4949
"devDependencies": {
50-
"eslint": "^8.42.0",
50+
"eslint": "^8.43.0",
5151
"eslint-plugin-node": "^11.1.0",
5252
"eslint-plugin-promise": "^6.1.1",
5353
"eslint-plugin-security": "^1.7.1",
@@ -57,6 +57,6 @@
5757
"mocha-steps": "^1.3.0",
5858
"nyc": "^15.1.0",
5959
"pre-commit": "^1.2.2",
60-
"sinon": "^15.1.0"
60+
"sinon": "^15.2.0"
6161
}
6262
}

‎server.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@ const ADDR = process.env.LISTEN_ADDR || '127.0.0.1';
1717
(async function main () {
1818
let config, logger, db, service;
1919
try {
20+
// This provides an async context store for persisting unique log data per request, id est a requestId.
2021
const asyncLocalStorage = new AsyncLocalStorage();
22+
2123
config = new Config(process.env.NODE_ENV);
2224
logger = new Logger(config.logger, { nodeId: config.nodeId }, asyncLocalStorage);
2325
db = new DB(logger, config);
@@ -26,7 +28,7 @@ const ADDR = process.env.LISTEN_ADDR || '127.0.0.1';
2628

2729
http.createServer(async (req, res) => {
2830
await asyncLocalStorage.run({}, async () => {
29-
await service.dispatch(req, res);
31+
return service.dispatch(req, res);
3032
});
3133
}).listen(PORT, ADDR, (err) => {
3234
if (err) {

‎src/common.js

+20-9
Original file line numberDiff line numberDiff line change
@@ -61,20 +61,31 @@ const freezeDeep = (o) => {
6161

6262

6363
/**
64-
* Pick out useful axios response fields.
64+
* Pick out useful got response fields.
6565
* @param {*} res
6666
* @returns
6767
*/
68-
const axiosResponseLogData = (res) => {
68+
const gotResponseLogData = (res) => {
6969
const data = common.pick(res, [
70-
'status',
71-
'statusText',
70+
'statusCode',
71+
'statusMessage',
7272
'headers',
73-
'elapsedTimeMs',
74-
'data',
73+
'body',
74+
'error',
7575
]);
76-
if (data.data) {
77-
data.data = logTruncate(data.data, 100);
76+
if (typeof res.body === 'string') {
77+
data.body = logTruncate(data.body, 100);
78+
} else if (res.body instanceof Buffer) {
79+
data.body = `<Buffer ${res.body.byteLength} bytes>`;
80+
}
81+
if (res?.timings?.phases?.total) {
82+
data.elapsedTimeMs = res.timings.phases.total;
83+
}
84+
if (res?.redirectUrls?.length) {
85+
data.redirectUrls = res.redirectUrls;
86+
}
87+
if (res?.retryCount) {
88+
data.retryCount = res.retryCount;
7889
}
7990
return data;
8091
};
@@ -155,7 +166,7 @@ module.exports = {
155166
...common,
156167
arrayChunk,
157168
attemptRetrySeconds,
158-
axiosResponseLogData,
169+
gotResponseLogData,
159170
ensureArray,
160171
freezeDeep,
161172
logTruncate,

‎src/communication.js

+143-157
Large diffs are not rendered by default.

‎src/db/postgres/index.js

+2
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,8 @@ class DatabasePostgres extends Database {
6868
// Log errors
6969
pgpInitOptions.error = (err, event) => {
7070
this.logger.error(_fileScope('pgp:error'), '', { err, event });
71+
72+
// TODO: close connection on err.code === '57P03' database shutting down
7173
};
7274

7375
// Deophidiate column names in-place, log results

‎src/manager.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -354,7 +354,7 @@ class Manager {
354354

355355
// Parse and validate all the topics in the request.
356356
data.publishTopics = await this._publishTopics(dbCtx, data, requestId);
357-
if (!data.publishTopics || !data.publishTopics.length) {
357+
if (!data?.publishTopics?.length) {
358358
const details = Manager._prettyDetails(['no valid topic urls to publish'], []);
359359
throw new ResponseError(Enum.ErrorResponse.BadRequest, details);
360360
}
@@ -636,7 +636,7 @@ class Manager {
636636
this.logger.debug(_scope, 'got topics', { topics: ctx.topics });
637637

638638
// Profile users can only see related topics.
639-
if (ctx.session && ctx.session.authenticatedProfile) {
639+
if (ctx?.session?.authenticatedProfile) {
640640
const profileUrlObj = new URL(ctx.session.authenticatedProfile);
641641
ctx.topics = ctx.topics.filter((topic) => {
642642
const topicUrlObj = new URL(topic.url);
@@ -673,7 +673,7 @@ class Manager {
673673
this.logger.debug(_scope, 'got topic details', { topic: ctx.topic, subscriptions: ctx.subscriptions, updates: ctx.publishCount });
674674

675675
// Profile users can only see related topics.
676-
if (ctx.session && ctx.session.authenticatedProfile) {
676+
if (ctx?.session?.authenticatedProfile) {
677677
const profileUrlObj = new URL(ctx.session.authenticatedProfile);
678678
const topicUrlObj = new URL(ctx.topic.url);
679679
if (!Manager._profileControlsTopic(profileUrlObj, topicUrlObj)) {
@@ -683,7 +683,7 @@ class Manager {
683683
}
684684

685685
res.end(Template.adminTopicDetailsHTML(ctx, this.options));
686-
this.logger.info(_scope, 'finished', { ctx, subscriptions: ctx.subscriptions.length, topic: ctx.topic && ctx.topic.id || ctx.topic });
686+
this.logger.info(_scope, 'finished', { ctx, subscriptions: ctx.subscriptions.length, topic: ctx?.topic?.id || ctx.topic });
687687
}
688688

689689

‎src/service.js

+9-2
Original file line numberDiff line numberDiff line change
@@ -72,12 +72,19 @@ class Service extends Dingus {
7272

7373
/**
7474
* Rearrange logging data.
75+
* @param {http.ClientRequest} req
76+
* @param {http.ServerResponse} res
77+
* @param {Object} ctx
7578
*/
7679
async preHandler(req, res, ctx) {
7780
await super.preHandler(req, res, ctx);
7881
const logObject = this.asyncLocalStorage.getStore();
79-
logObject.requestId = ctx.requestId;
80-
delete ctx.requestId;
82+
// FIXME: for some reason, returning from the super.preHandler loses async context?
83+
// Workaround until cause and solution are found.
84+
if (logObject) {
85+
logObject.requestId = ctx.requestId;
86+
delete ctx.requestId;
87+
}
8188
}
8289

8390

‎test-e2e/fake-servers-client.js

+78-62
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,30 @@
44
* Wrapper interface for controlling fake-servers.
55
*/
66

7-
const axios = require('axios');
8-
97
class FakeClient {
108
constructor(host, subscriberPort, topicPort) {
119
this.logger = console;
1210
this.host = host;
1311
this.subscriberPort = subscriberPort;
1412
this.topicPort = topicPort;
15-
this.axios = axios.create({
16-
validateStatus: (statusCode) => (Math.floor(statusCode / 100)) === 2,
17-
headers: {
18-
'User-Agent': 'FakeClient',
19-
},
20-
});
13+
this.Got = undefined;
14+
this.got = this._init.bind(this);
15+
}
16+
17+
async _init(...args) {
18+
if (!this.Got) {
19+
// eslint-disable-next-line
20+
this.Got = await import('got');
21+
this.got = this.Got.got.extend({
22+
headers: {
23+
'User-Agent': 'FakeClient',
24+
},
25+
responseType: 'text',
26+
});
27+
}
28+
if (args.length) {
29+
return this.got(...args);
30+
}
2131
}
2232

2333
topicUrl(id) {
@@ -28,42 +38,43 @@ class FakeClient {
2838
return `http://${this.host}:${this.subscriberPort}/subscriber/${id}${extra}`;
2939
}
3040

31-
static _axiosRequestConfig(method, url, params = {}, headers = {}, data) {
32-
const urlObj = new URL(url);
33-
const config = {
41+
static _requestConfig(method, url, params = {}, headers = {}, body = undefined) {
42+
const gotConfig = {
3443
method,
35-
url: `${urlObj.origin}${urlObj.pathname}`,
36-
params: urlObj.searchParams,
44+
url: new URL(url),
3745
headers,
38-
...(data && { data }),
39-
responseType: 'text',
40-
transformResponse: [ (res) => res ],
46+
...(body && { body }),
4147
};
42-
Object.entries(params).map(([k, v]) => config.params.set(k, v));
43-
return config;
48+
Object.entries(params).forEach(([k, v]) => gotConfig.url.searchParams.set(k, v));
49+
return gotConfig;
50+
}
51+
52+
static _formData(obj) {
53+
return Object.entries(obj)
54+
.map((entry) => entry.map(encodeURIComponent).join('='))
55+
.join('&')
56+
;
4457
}
4558

4659
async subscribe(hubUrl, subscriberId, topicId, postData = {}) {
4760
const topicUrl = this.topicUrl(topicId);
4861
const subscriberUrl = this.subscriberUrl(subscriberId);
49-
const data = {
62+
const data = FakeClient._formData({
5063
'hub.callback': subscriberUrl,
5164
'hub.mode': 'subscribe',
5265
'hub.topic': topicUrl,
5366
'hub.lease_seconds': 60,
5467
'hub.secret': 'sharedSecret',
5568
...postData,
56-
};
57-
const formData = new URLSearchParams(data).toString();
58-
const headers = {
69+
});
70+
const config = FakeClient._requestConfig('POST', hubUrl, {}, {
5971
'Content-Type': 'application/x-www-form-urlencoded',
60-
};
61-
72+
}, data);
6273
try {
63-
return this.axios(FakeClient._axiosRequestConfig('POST', hubUrl, {}, headers, formData));
64-
} catch (e) {
65-
this.logger.error('subscribe', e);
66-
throw e;
74+
return await this.got(config);
75+
} catch (error) {
76+
this.logger.error('subscribe', error, config);
77+
throw error;
6778
}
6879
}
6980

@@ -83,14 +94,15 @@ class FakeClient {
8394
contentType: 'text/plain',
8495
};
8596
const url = this.topicUrl(id);
97+
const config = FakeClient._requestConfig('PUT', url, {
98+
...defaultBehavior,
99+
...behavior,
100+
});
86101
try {
87-
return this.axios(FakeClient._axiosRequestConfig('PUT', url, {
88-
...defaultBehavior,
89-
...behavior,
90-
}));
91-
} catch (e) {
92-
this.logger.error('topicSet', e);
93-
throw e;
102+
return await this.got(config);
103+
} catch (error) {
104+
this.logger.error('topicSet', error, config);
105+
throw error;
94106
}
95107
}
96108

@@ -99,12 +111,13 @@ class FakeClient {
99111
* @param {String} id
100112
*/
101113
async topicDelete(id) {
102-
const url =this.topicUrl(id);
114+
const url = this.topicUrl(id);
115+
const config = FakeClient._requestConfig('DELETE', url);
103116
try {
104-
return this.axios(FakeClient._axiosRequestConfig('DELETE', url));
105-
} catch (e) {
106-
this.logger.error('topicDelete', e);
107-
throw e;
117+
return await this.got(config);
118+
} catch (error) {
119+
this.logger.error('topicDelete', error, config);
120+
throw error;
108121
}
109122
}
110123

@@ -121,14 +134,15 @@ class FakeClient {
121134
matchChallenge: true,
122135
};
123136
const url = this.subscriberUrl(id, '/verify');
137+
const config = FakeClient._requestConfig('PUT', url, {
138+
...defaultBehavior,
139+
...behavior,
140+
});
124141
try {
125-
return this.axios(FakeClient._axiosRequestConfig('PUT', url, {
126-
...defaultBehavior,
127-
...behavior,
128-
}));
129-
} catch (e) {
130-
this.logger.error('subscriberSetVerify', e);
131-
throw e;
142+
return await this.got(config);
143+
} catch (error) {
144+
this.logger.error('subscriberSetVerify', error, config);
145+
throw error;
132146
}
133147
}
134148

@@ -138,19 +152,20 @@ class FakeClient {
138152
* @param {Object} behavior
139153
* @param {Number} behavior.statusCode
140154
*/
141-
async subscriberSetContent(id, behavior = {}) {
142-
const defaultBehavior = {
143-
statusCode: 200,
144-
};
155+
async subscriberSetContent(id, behavior = {}) {
156+
const defaultBehavior = {
157+
statusCode: 200,
158+
};
145159
const url = this.subscriberUrl(id, '/content');
160+
const config = FakeClient._requestConfig('PUT', url, {
161+
...defaultBehavior,
162+
...behavior,
163+
});
146164
try {
147-
return this.axios(FakeClient._axiosRequestConfig('PUT', url, {
148-
...defaultBehavior,
149-
...behavior,
150-
}));
151-
} catch (e) {
152-
this.logger.error('subscriberSetContent', e);
153-
throw e;
165+
return await this.got(config);
166+
} catch (error) {
167+
this.logger.error('subscriberSetContent', error, config);
168+
throw error;
154169
}
155170
}
156171

@@ -160,11 +175,12 @@ class FakeClient {
160175
*/
161176
async subscriberDelete(id) {
162177
const url = this.subscriberUrl(id);
178+
const config = FakeClient._requestConfig('DELETE', url);
163179
try {
164-
return this.axios(FakeClient._axiosRequestConfig('DELETE', url));
165-
} catch (e) {
166-
this.logger.error('subscriberDelete', e);
167-
throw e;
180+
return await this.got(config);
181+
} catch (error) {
182+
this.logger.error('subscriberDelete', error, config);
183+
throw error;
168184
}
169185
}
170186

‎test-e2e/fake-servers.js

+9-4
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ class TopicFake extends Dingus {
4646
res.setHeader('Link', behavior.selfLink + (behavior.hubLink ? `, ${behavior.hubLink}` : ''));
4747
res.statusCode = behavior.statusCode;
4848
res.end(behavior.content);
49-
this.logger.info({ method: req.method, statusCode: res.statusCode, url: req.url });
49+
this.logger.info('TopicFake:getId', { method: req.method, statusCode: res.statusCode, url: req.url });
5050
}
5151

5252
async putId(req, res, ctx) {
@@ -61,13 +61,15 @@ class TopicFake extends Dingus {
6161
};
6262
this.topicBehaviors.set(id, behavior);
6363
res.statusCode = 200;
64+
this.logger.info('TopicFake:putId', { method: req.method, statusCode: res.statusCode, url: req.url });
6465
res.end();
6566
}
6667

6768
async deleteId(req, res, ctx) {
6869
this.setResponseType(this.responseTypes, req, res, ctx);
6970
this.topicBehaviors.delete(ctx.params.id);
7071
res.statusCode = 200;
72+
this.logger.info('TopicFake:deleteId', { method: req.method, statusCode: res.statusCode, url: req.url });
7173
res.end();
7274
}
7375

@@ -97,9 +99,9 @@ class SubscriberFake extends Dingus {
9799
this.setResponseType(this.responseTypes, req, res, ctx);
98100
const behavior = this.verifyBehaviors.get(ctx.params.id);
99101
res.statusCode = behavior ? behavior.statusCode : 404;
100-
const response = (behavior && behavior.matchChallenge) ? ctx.queryParams['hub.challenge'] : (behavior && behavior.response);
102+
const response = (behavior?.matchChallenge) ? ctx.queryParams['hub.challenge'] : (behavior?.response);
101103
res.end(response);
102-
this.logger.info({ method: req.method, statusCode: res.statusCode, matchChallenge: !!(behavior && behavior.matchChallenge), url: req.url });
104+
this.logger.info('SubscriberFake:getId', { method: req.method, statusCode: res.statusCode, matchChallenge: !!(behavior?.matchChallenge), url: req.url });
103105
}
104106

105107
async postId(req, res, ctx) {
@@ -112,7 +114,7 @@ class SubscriberFake extends Dingus {
112114
behavior.content = ctx.rawBody;
113115
}
114116
res.end();
115-
this.logger.info({ content: behavior && behavior.content, method: req.method, statusCode: res.statusCode, matchChallenge: !!(behavior && behavior.matchChallenge), url: req.url });
117+
this.logger.info('SubscriberFake:postId', { content: behavior?.content, method: req.method, statusCode: res.statusCode, matchChallenge: !!(behavior?.matchChallenge), url: req.url });
116118
}
117119

118120
async putVerify(req, res, ctx) {
@@ -129,6 +131,7 @@ class SubscriberFake extends Dingus {
129131
}
130132
res.statusCode = 200;
131133
res.end();
134+
this.logger.info('SubscriberFake:putVerify', { method: req.method, statusCode: res.statusCode, url: req.url });
132135
}
133136

134137
async putContent(req, res, ctx) {
@@ -139,6 +142,7 @@ class SubscriberFake extends Dingus {
139142
this.contentBehaviors.set(ctx.params.id, behavior);
140143
res.statusCode = 200;
141144
res.end();
145+
this.logger.info('SubscriberFake:putContent', { method: req.method, statusCode: res.statusCode, url: req.url });
142146
}
143147

144148
async deleteId(req, res, ctx) {
@@ -147,6 +151,7 @@ class SubscriberFake extends Dingus {
147151
this.verifyBehaviors.delete(ctx.params.id);
148152
res.statusCode = 200;
149153
res.end();
154+
this.logger.info('SubscriberFake:deleteId', { method: req.method, statusCode: res.statusCode, url: req.url });
150155
}
151156

152157
} // SubscriberFake

‎test-e2e/test-many.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
const assert = require('assert');
4-
const uuid = require('uuid');
3+
const crypto = require('crypto');
54
const FakeServersClient = require('./fake-servers-client');
65

76
const subscriberPort = process.env.FAKE_SUBSCRIBER_PORT || 9876;
@@ -14,14 +13,14 @@ const hubUrl = `http://${hubAddress}:${hubPort}/`;
1413
const client = new FakeServersClient(listenAddress, subscriberPort, topicPort);
1514

1615
async function newTopic() {
17-
const id = uuid.v4();
16+
const id = crypto.randomUUID();
1817
await client.topicSet(id, { hubUrl });
1918
console.log('created fake topic', id);
2019
return id;
2120
}
2221

2322
async function newSubscriber() {
24-
const id = uuid.v4();
23+
const id = crypto.randomUUID();
2524
await client.subscriberSetVerify(id);
2625
console.log('created fake subscriber', id);
2726
return id;

‎test-e2e/test-one.js

+4-5
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
'use strict';
22

3-
const assert = require('assert');
4-
const uuid = require('uuid');
3+
const crypto = require('crypto');
54
const FakeServersClient = require('./fake-servers-client');
65

76
const subscriberPort = process.env.FAKE_SUBSCRIBER_PORT || 9876;
@@ -14,14 +13,14 @@ const hubUrl = `http://${hubAddress}:${hubPort}/`;
1413
const client = new FakeServersClient(listenAddress, subscriberPort, topicPort);
1514

1615
async function newTopic() {
17-
const id = uuid.v4();
16+
const id = crypto.randomUUID();
1817
await client.topicSet(id, { hubUrl });
1918
console.log('created fake topic', id);
2019
return id;
2120
}
2221

2322
async function newSubscriber() {
24-
const id = uuid.v4();
23+
const id = crypto.randomUUID();
2524
await client.subscriberSetVerify(id);
2625
console.log('created fake subscriber', id);
2726
return id;
@@ -32,7 +31,7 @@ async function newSubscriber() {
3231
const subscriberId = await newSubscriber();
3332

3433
const result = await client.subscribe(hubUrl, subscriberId, topicId);
35-
console.log('subscribed', { status: result.status, headers: result.headers, data: result.data });
34+
console.log('subscribed', { status: result.statusCode, headers: result.headers, body: result.body });
3635

3736
console.log('done');
3837
})().catch((e) => {

‎test/src/common.js

+38-14
Original file line numberDiff line numberDiff line change
@@ -23,47 +23,71 @@ describe('Common', function () {
2323
});
2424
}); // freezeDeep
2525

26-
describe('axiosResponseLogData', function () {
26+
describe('gotResponseLogData', function () {
2727
it('covers', function () {
2828
const response = {
29-
status: 200,
30-
statusText: 'OK',
29+
statusCode: 200,
30+
statusMessage: 'OK',
3131
headers: {
3232
'Content-Type': 'text/plain',
3333
},
3434
otherData: 'blah',
35-
data: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green Meadows," said Old Mother West Wind, “and there I saw the Best Thing in the World.”',
35+
body: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green Meadows," said Old Mother West Wind, “and there I saw the Best Thing in the World.”',
36+
timings: {
37+
phases: {
38+
total: 87,
39+
},
40+
},
41+
retryCount: 2,
42+
redirectUrls: ['https://example.com/clip/Thornton_Burgess'],
3643
};
3744
const expected = {
38-
status: 200,
39-
statusText: 'OK',
45+
statusCode: 200,
46+
statusMessage: 'OK',
4047
headers: {
4148
'Content-Type': 'text/plain',
4249
},
43-
data: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green... (184 bytes)',
50+
body: 'Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green... (184 bytes)',
51+
elapsedTimeMs: 87,
52+
retryCount: 2,
53+
redirectUrls: ['https://example.com/clip/Thornton_Burgess'],
54+
};
55+
const result = common.gotResponseLogData(response);
56+
assert.deepStrictEqual(result, expected);
57+
});
58+
it('covers buffer data', function () {
59+
const response = {
60+
statusCode: 200,
61+
statusMessage: 'OK',
62+
body: Buffer.from('Old Mother West Wind had stopped to talk with the Slender Fir Tree. "I\'ve just come across the Green Meadows," said Old Mother West Wind, “and there I saw the Best Thing in the World.”'),
63+
};
64+
const expected = {
65+
statusCode: 200,
66+
statusMessage: 'OK',
67+
body: '<Buffer 188 bytes>',
4468
};
45-
const result = common.axiosResponseLogData(response);
69+
const result = common.gotResponseLogData(response);
4670
assert.deepStrictEqual(result, expected);
4771
});
4872
it('covers no data', function () {
4973
const response = {
50-
status: 200,
51-
statusText: 'OK',
74+
statusCode: 200,
75+
statusMessage: 'OK',
5276
headers: {
5377
'Content-Type': 'text/plain',
5478
},
5579
};
5680
const expected = {
57-
status: 200,
58-
statusText: 'OK',
81+
statusCode: 200,
82+
statusMessage: 'OK',
5983
headers: {
6084
'Content-Type': 'text/plain',
6185
},
6286
};
63-
const result = common.axiosResponseLogData(response);
87+
const result = common.gotResponseLogData(response);
6488
assert.deepStrictEqual(result, expected);
6589
});
66-
}); // axiosResponseLogData
90+
}); // gotResponseLogData
6791

6892
describe('topicLeaseDefaults', function () {
6993
it('supplies necessary properties', function () {

‎test/src/communication.js

+92-215
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)
Please sign in to comment.