Skip to content

Commit

Permalink
add unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
julien-f committed Aug 30, 2023
1 parent e421e13 commit 21d18c0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/xo-server/src/_normalizeVmNetworks.spec.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ tap.test('normalizeVmNetworks', async t => {
'0/ipv4/1': '127.0.0.5',

// any key are allowed
'0/ipv4/foo bar': '127.0.0.3',
'0/ipv4/foo bar': '127.0.0.3 127.0.0.6',

// ipv6 protocol is supported as well
'0/ipv6/0': '::1',
'0/ipv6/0': '::1 ::2',

// empty addresses are ignored
'0/ipv4/3': ' ',
Expand All @@ -36,7 +36,9 @@ tap.test('normalizeVmNetworks', async t => {
'0/ipv4/2': '127.0.0.5',
'0/ipv4/3': '127.0.0.4',
'0/ipv4/4': '127.0.0.3',
'0/ipv4/5': '127.0.0.6',
'0/ipv6/0': '::1',
'0/ipv6/1': '::2',
'1/ipv4/0': '127.0.0.1',
}
)
Expand Down

0 comments on commit 21d18c0

Please sign in to comment.