Skip to content

Commit

Permalink
Update curl version in tests/examples to something much more recent
Browse files Browse the repository at this point in the history
  • Loading branch information
magnetikonline committed Apr 20, 2024
1 parent 93a3251 commit bdbe0b9
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 13 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,7 @@ Sets/adds HTTP headers to the request payload:
```js
const harness = new edgy.EVENT_TYPE_CONSTRUCTOR();
harness
.addRequestHttpHeader('User-Agent','curl/7.66.0')
.addRequestHttpHeader('User-Agent','curl/8.4.0')
.addRequestHttpHeader('X-Custom-Header','apples')
.addRequestHttpHeader('X-Custom-Header','oranges');

Expand All @@ -400,7 +400,7 @@ harness
cf: {
request: {
headers: {
'user-agent': [ { key: 'User-Agent', value: 'curl/7.66.0' } ],
'user-agent': [ { key: 'User-Agent', value: 'curl/8.4.0' } ],
'x-custom-header': [
{ key: 'X-Custom-Header', value: 'apples' },
{ key: 'X-Custom-Header', value: 'oranges' }
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

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

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@magnetikonline/edgy",
"version": "1.2.4",
"version": "1.3.0",
"description": "Harness for authoring tests against AWS CloudFront Lambda@Edge functions.",
"keywords": [
"aws",
Expand Down
16 changes: 8 additions & 8 deletions test/main-property.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ function testPropertyRequestHttpHeader(inst) {
// add a series of HTTP headers
inst
.addRequestHttpHeader('Host','my-hostname.tld')
.addRequestHttpHeader('User-Agent','curl/7.x.x')
.addRequestHttpHeader('User-Agent','curl/8.4.0')
.addRequestHttpHeader('Multi-Key','apples')
.addRequestHttpHeader('Multi-Key','oranges')
.addRequestHttpHeader(' Trim ',' value ');
Expand All @@ -262,7 +262,7 @@ function testPropertyRequestHttpHeader(inst) {
{ key: 'Trim',value: 'value' },
],
'user-agent': [
{ key: 'User-Agent',value: 'curl/7.x.x' },
{ key: 'User-Agent',value: 'curl/8.4.0' },
],
}
);
Expand All @@ -281,7 +281,7 @@ function testPropertyRequestHttpHeader(inst) {
{ key: 'Multi-Key',value: 'single-header' },
],
'user-agent': [
{ key: 'User-Agent',value: 'curl/7.x.x' },
{ key: 'User-Agent',value: 'curl/8.4.0' },
],
}
);
Expand Down Expand Up @@ -348,7 +348,7 @@ function testPropertyRequestOrigin(inst) {
inst
.addOriginHttpHeader('Multi-Origin-Key','apples')
.addOriginHttpHeader('Multi-Origin-Key','oranges')
.addOriginHttpHeader('User-Agent','curl/7.x.x')
.addOriginHttpHeader('User-Agent','curl/8.4.0')
.addOriginHttpHeader('X-Remove-Me','banana');

assert.deepEqual(cfEventData(inst).request.origin.custom.customHeaders,
Expand All @@ -361,7 +361,7 @@ function testPropertyRequestOrigin(inst) {
{ key: 'X-Remove-Me',value: 'banana' },
],
'user-agent': [
{ key: 'User-Agent',value: 'curl/7.x.x' },
{ key: 'User-Agent',value: 'curl/8.4.0' },
],
}
);
Expand All @@ -376,7 +376,7 @@ function testPropertyRequestOrigin(inst) {
{ key: 'Multi-Origin-Key',value: 'single-header' },
],
'user-agent': [
{ key: 'User-Agent',value: 'curl/7.x.x' },
{ key: 'User-Agent',value: 'curl/8.4.0' },
],
}
);
Expand Down Expand Up @@ -454,7 +454,7 @@ function testPropertyRequestOrigin(inst) {
inst
.addOriginHttpHeader('Multi-Origin-Key','apples')
.addOriginHttpHeader('Multi-Origin-Key','oranges')
.addOriginHttpHeader('User-Agent','curl/7.x.x');
.addOriginHttpHeader('User-Agent','curl/8.4.0');

assert.deepEqual(cfEventData(inst).request.origin.s3.customHeaders,
{
Expand All @@ -463,7 +463,7 @@ function testPropertyRequestOrigin(inst) {
{ key: 'Multi-Origin-Key',value: 'oranges' },
],
'user-agent': [
{ key: 'User-Agent',value: 'curl/7.x.x' },
{ key: 'User-Agent',value: 'curl/8.4.0' },
],
}
);
Expand Down

0 comments on commit bdbe0b9

Please sign in to comment.