Skip to content

Commit

Permalink
Fix tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
danfuzz committed Dec 5, 2024
1 parent bc016a3 commit 34e9aa4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 3 additions & 5 deletions src/net-util/tests/IncomingRequest.test.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2022-2024 the Lactoserv Authors (Dan Bornstein et alia).
// SPDX-License-Identifier: Apache-2.0

import { HttpHeaders, IncomingRequest, EndpointAddress, RequestContext }
import { HttpHeaders, IncomingRequest, EndpointAddress, InterfaceAddress,
RequestContext }
from '@this/net-util';


Expand All @@ -15,10 +16,7 @@ import { HttpHeaders, IncomingRequest, EndpointAddress, RequestContext }
function makeWithHeaders(headers) {
const config = {
context: new RequestContext(
Object.freeze({
address: '127.0.0.1',
port: 123
}),
new InterfaceAddress('127.0.0.1:123'),
new EndpointAddress('10.0.0.1', 10321)),
headers: new HttpHeaders(headers),
logger: null,
Expand Down
5 changes: 3 additions & 2 deletions src/webapp-builtins/tests/RequestUtil.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
// Copyright 2022-2024 the Lactoserv Authors (Dan Bornstein et alia).
// SPDX-License-Identifier: Apache-2.0

import { HttpHeaders, IncomingRequest, EndpointAddress, RequestContext }
import { HttpHeaders, IncomingRequest, EndpointAddress, InterfaceAddress,
RequestContext }
from '@this/net-util';


Expand Down Expand Up @@ -38,7 +39,7 @@ export class RequestUtil {

return new IncomingRequest({
context: new RequestContext(
Object.freeze({ address: 'localhost', port: 12345 }),
new InterfaceAddress('localhost:12345'),
new EndpointAddress('99.88.77.66', 54321 )),
headers: new HttpHeaders({
'some-header': 'something'
Expand Down

0 comments on commit 34e9aa4

Please sign in to comment.