Skip to content

Commit

Permalink
Fix address util test for loopback of ipv6 (hazelcast#1095)
Browse files Browse the repository at this point in the history
* Fix address util test for loopback of ipv6

* Delete `.be` s

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>

Co-authored-by: Metin Dumandag <metindumandag@gmail.com>
  • Loading branch information
srknzl and mdumandag committed Jan 31, 2022
1 parent fdee35d commit 30a1db1
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
4 changes: 0 additions & 4 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,6 @@
"before": true
}
],
"linebreak-style": [
"warn",
"unix"
],
"max-len": [
"warn",
{
Expand Down
8 changes: 4 additions & 4 deletions test/unit/util/AddressUtilTest.js
Original file line number Diff line number Diff line change
Expand Up @@ -149,14 +149,14 @@ describe('AddressUtilTest', function () {
expect(result).to.be.false;
});

it('resolveAddress: returns IPv4 for localhost with port', async function () {
it('resolveAddress: returns loopback address for localhost with port', async function () {
const result = await resolveAddress('localhost:5701');
expect(result).to.be.equal('127.0.0.1');
expect(result).to.satisfy(ip => ip === '127.0.0.1' || ip === '::1');
});

it('resolveAddress: returns IPv4 for localhost without port', async function () {
it('resolveAddress: returns loopback address for localhost without port', async function () {
const result = await resolveAddress('localhost');
expect(result).to.be.equal('127.0.0.1');
expect(result).to.satisfy(ip => ip === '127.0.0.1' || ip === '::1');
});

it('resolveAddress: returns IPv4 for IPv4 address with port', async function () {
Expand Down

0 comments on commit 30a1db1

Please sign in to comment.