Skip to content

Commit

Permalink
Merge branch 'release/7.41.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
codenirvana committed Aug 6, 2024
2 parents c8b22d4 + 3d84bb4 commit cc81d10
Show file tree
Hide file tree
Showing 4 changed files with 82 additions and 21 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@
7.41.1:
date: 2024-08-06
chores:
- Updated dependencies

7.41.0:
date: 2024-08-01
new features:
Expand Down
32 changes: 16 additions & 16 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "postman-runtime",
"version": "7.41.0",
"version": "7.41.1",
"description": "Underlying library of executing Postman Collections",
"author": "Postman Inc.",
"license": "Apache-2.0",
Expand Down Expand Up @@ -44,7 +44,7 @@
"dependencies": {
"@postman/tough-cookie": "4.1.3-postman.1",
"async": "3.2.5",
"aws4": "1.13.0",
"aws4": "1.13.1",
"handlebars": "4.7.8",
"httpntlm": "1.8.13",
"jose": "5.6.3",
Expand All @@ -55,7 +55,7 @@
"node-oauth1": "1.3.0",
"performance-now": "2.1.0",
"postman-collection": "4.5.0",
"postman-request": "2.88.1-postman.37",
"postman-request": "2.88.1-postman.38",
"postman-sandbox": "5.1.1",
"postman-url-encoder": "3.0.5",
"serialised-error": "1.1.3",
Expand Down
60 changes: 58 additions & 2 deletions test/integration/request-flow/headers.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,25 @@ var sinon = require('sinon'),
}]
}
}
}, {
name: 'http2',
request: {
url: 'https://postman-echo.com/get',
method: 'GET'
},
protocolProfileBehavior: {
protocolVersion: 'http2'
}
},
{
name: 'auto',
request: {
url: 'https://postman-echo.com/get',
method: 'GET'
},
protocolProfileBehavior: {
protocolVersion: 'auto'
}
}]
}
}, function (err, results) {
Expand All @@ -131,8 +150,8 @@ var sinon = require('sinon'),
sinon.assert.calledOnce(testrun.done);
sinon.assert.calledWith(testrun.done.getCall(0), null);

sinon.assert.callCount(testrun.request, 6);
sinon.assert.callCount(testrun.response, 6);
sinon.assert.callCount(testrun.request, 8);
sinon.assert.callCount(testrun.response, 8);
});

it('should handle duplicate headers correctly', function () {
Expand Down Expand Up @@ -263,4 +282,41 @@ var sinon = require('sinon'),
expect(request.headers.members[request.headers.count() - 1])
.to.deep.equal(new Header({ key: 'Content-Length', system: true, value: '253' }));
});

it('should have all request headers in http2 in debug data', function () {
sinon.assert.calledWith(testrun.request.getCall(6), null);
sinon.assert.calledWith(testrun.response.getCall(6), null);

var history = testrun.response.getCall(6).lastArg,
executionData = history.execution.data[0],
requestHeaders = executionData.request.headers;

const headersToCheck = new Set(['accept', 'cache-control', 'accept-encoding',
'cookie', 'postman-token', ':path', ':method', ':authority', ':scheme', 'user-agent']);

expect(executionData.response.httpVersion).to.eql('2.0');

requestHeaders.forEach(({ key }) => {
expect(headersToCheck.has(key.toLowerCase())).to.eql(true, `Header ${key} not found`);
});
});

it('should have all request headers in http2 in debug auto', function () {
sinon.assert.calledWith(testrun.request.getCall(7), null);
sinon.assert.calledWith(testrun.response.getCall(7), null);

var history = testrun.response.getCall(7).lastArg,
executionData = history.execution.data[0],
requestHeaders = executionData.request.headers;


const headersToCheck = new Set(['accept', 'cache-control', 'accept-encoding',
'cookie', 'postman-token', ':path', ':method', ':authority', ':scheme', 'user-agent']);

expect(executionData.response.httpVersion).to.eql('2.0');

requestHeaders.forEach(({ key }) => {
expect(headersToCheck.has(key.toLowerCase())).to.eql(true, `Header ${key} not found`);
});
});
});

0 comments on commit cc81d10

Please sign in to comment.