TRITON-1389: node-triton tests: cli-networks.test.js fails

Details

Issue Type:Bug
Priority:4 - Normal
Status:Resolved
Created at:2019-04-09T21:45:48.291Z
Updated at:2022-08-10T14:16:16.425Z

People

Created by:Former user
Reported by:Former user
Assigned to:Brian Bennett

Related Links

Description

node-triton's "test/integration/cli-networks.test.js" is trivially failing with a usage error. I don't know when that broke as we haven't been runningn node-triton tests consistently.

$ make test-integration TEST_CONFIG=test/nightly-1.json TEST_GLOB=*networks*
NODE_NDEBUG= ./node_modules/.bin/tap --timeout 1200 -j 10 \
		-o ./test-integration.tap test/integration/*networks*.test.js
test/integration/api-networks.test.js ............... 18/18 9s
test/integration/cli-networks.test.js ...triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
usage: triton network create [OPTIONS] VLAN
] killed: false, code: 1, signal: null, cmd: '/bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2' }, jse_info: {}, jse_shortmsg: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN', message: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n' }
........triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
usage: triton network create [OPTIONS] VLAN
] killed: false, code: 1, signal: null, cmd: '/bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2' }, jse_info: {}, jse_shortmsg: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN', message: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n' }
..triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
usage: triton network create [OPTIONS] VLAN
] killed: false, code: 1, signal: null, cmd: '/bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2' }, jse_info: {}, jse_shortmsg: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN', message: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n' }
..  ---
    operator: error
    expected: |-
      undefined
    actual: |-
      { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
    at: Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
    stack: |-
      VError: exec error:
      	command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
      	exit status: 1
      	stdout:

      	stderr:
      triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
      usage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
test/integration/cli-networks.test.js ............... 50/58 20s
  not ok VError: exec error: command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 exit status: 1 stdout: stderr: triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x) usage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x) usage: triton network create [OPTIONS] VLAN
    operator: error
    expected: undefined
    actual: >-
      { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
      /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton
      network create --name=nodetritontest-network-bluesteel.local
      --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)'
    stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"

  not ok undefined: error body
    operator: deepEqual
    expected: {}
    actual: undefined
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)'

  not ok create test network
    operator: error
    expected: undefined
    actual: >-
      { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
      /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton
      network create --name=nodetritontest-network-bluesteel.local
      --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)'
    stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"

  not ok create test network: error body
    operator: deepEqual
    expected: {}
    actual: undefined
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)'

  not ok create test network
    operator: error
    expected: undefined
    actual: >-
      { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
      /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton
      network create --name=nodetritontest-network-bluesteel.local
      --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)'
    stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"

  not ok create test network: error body
    operator: deepEqual
    expected: {}
    actual: undefined
    at: 'Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)'

  not ok create test network
  not ok test count !== plan
    --- wanted
    +++ found
    -1
    +57
    results:
      ok: false
      count: 57
      pass: 50
      fail: 8
      bailout: false
      todo: 0
      skip: 0
      plan:
        start: null
        end: null
        skipAll: false
        skipReason: ''
        comment: ''
      failures:
        - ok: false
          id: 45
          name: >-
            VError: exec error: command:
            /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node
            /Users/trentm/joy/node-triton/bin/triton network create
            --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24
            --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 exit status: 1
            stdout: stderr: triton network create: error (Usage): without a
            --gateway (-g), you must specify --no-nat (-x) usage: triton network
            create [OPTIONS] VLAN: Command failed: /bin/sh -c
            /Users/trentm/opt/node-4.9.1/bin/node
            /Users/trentm/joy/node-triton/bin/triton network create
            --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24
            --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 triton network
            create: error (Usage): without a --gateway (-g), you must specify
            --no-nat (-x) usage: triton network create [OPTIONS] VLAN
          diag:
            operator: error
            expected: undefined
            actual: >-
              { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
              /Users/trentm/opt/node-4.9.1/bin/node
              /Users/trentm/joy/node-triton/bin/triton network create
              --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24
              --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
            stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"
          parent: ''
        - ok: false
          id: 46
          name: 'undefined: error body'
          diag:
            operator: deepEqual
            expected: {}
            actual: undefined
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)
          parent: ''
        - ok: false
          id: 53
          name: create test network
          diag:
            operator: error
            expected: undefined
            actual: >-
              { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
              /Users/trentm/opt/node-4.9.1/bin/node
              /Users/trentm/joy/node-triton/bin/triton network create
              --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24
              --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
            stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"
          parent: ''
        - ok: false
          id: 54
          name: 'create test network: error body'
          diag:
            operator: deepEqual
            expected: {}
            actual: undefined
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)
          parent: ''
        - ok: false
          id: 55
          name: create test network
          diag:
            operator: error
            expected: undefined
            actual: >-
              { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c
              /Users/trentm/opt/node-4.9.1/bin/node
              /Users/trentm/joy/node-triton/bin/triton network create
              --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24
              --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
            stack: "VError: exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n\n    at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27\n    at ChildProcess.exithandler (child_process.js:207:5)\n    at emitTwo (events.js:87:13)\n    at ChildProcess.emit (events.js:172:7)\n    at maybeClose (internal/child_process.js:862:16)\n    at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)"
          parent: ''
        - ok: false
          id: 56
          name: 'create test network: error body'
          diag:
            operator: deepEqual
            expected: {}
            actual: undefined
            at: >-
              Object.ifErr
              (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)
          parent: ''
        - ok: false
          id: 57
          name: create test network
          parent: ''
        - tapError: no plan

total ............................................... 68/76


  68 passing (20s)
  8 failing

make: *** [test-integration] Error 1



The TAP output:

TAP version 13
ok 1 - test/integration/api-networks.test.js # time=8565.381ms {
    # TritonApi networks
    #  setup
    ok 1 null
    #   cleanup: rm network node-triton-testnet967 if exists
    #  setup: net
    ok 2 null
    ok 3 networks
    #  TritonApi getNetwork
    ok 4 no err
    ok 5 id
    ok 6 no err
    ok 7 name
    ok 8 no err
    ok 9 shortId
    #  TritonApi deleteFabricNetwork
    ok 10 Error creating network
    ok 11 Error deleting net by id
    ok 12 Network should be gone
    ok 13 Error creating network
    ok 14 Error deleting net by name
    ok 15 Network should be gone
    ok 16 Error creating network
    ok 17 Error deleting net by shortId
    ok 18 Network should be gone
    
    #  teardown: client
    1..18
    # tests 18
    # pass  18
    
    # ok
}

not ok 2 - test/integration/cli-networks.test.js # time=19785.464ms
  ---
  timeout: 1200000
  file: test/integration/cli-networks.test.js
  command: /Users/trentm/opt/node-4.9.1/bin/node
  args:
    - test/integration/cli-networks.test.js
  stdio:
    - 0
    - pipe
    - 2
  cwd: /Users/trentm/joy/node-triton
  exitCode: 1
  ...
{
    # triton networks
    #   setup: find a test VLAN
    ok 1 null
    ok 2 vlan for testing found
    #  triton network list -h
    ok 3 null
    ok 4 (unnamed assert)
    #  triton help networks
    ok 5 null
    ok 6 (unnamed assert)
    #  triton networks
    ok 7 null
    ok 8 (unnamed assert)
    ok 9 (unnamed assert)
    #  triton network list
    ok 10 null
    ok 11 (unnamed assert)
    ok 12 (unnamed assert)
    #  triton networks public=false
    ok 13 null
    ok 14 should be equal
    #  triton network list public=false
    ok 15 null
    ok 16 should be equal
    ok 17 should be equal
    #  triton network list public=true
    ok 18 null
    ok 19 should be equal
    ok 20 should be equal
    #  triton network list public=bogus
    ok 21 VError: exec error: command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network list public=bogus exit status: 1 stdout: stderr: triton network: error: invalid boolean value for public: "bogus": Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network list public=bogus triton network: error: invalid boolean value for public: "bogus" 
    #  triton networks -l
    ok 22 null
    ok 23 (unnamed assert)
    #  triton networks -j
    ok 24 null
    ok 25 have at least one network
    ok 26 (unnamed assert)
    # triton network get
    #  triton network get -h
    ok 27 null
    ok 28 (unnamed assert)
    #  triton network help get
    ok 29 null
    ok 30 (unnamed assert)
    #  triton network get
    ok 31 (unnamed assert)
    ok 32 (unnamed assert)
    #  triton network get ID
    ok 33 null
    ok 34 should be equal
    #  triton network get SHORTID
    ok 35 null
    ok 36 should be equal
    #  triton network get NAME
    ok 37 null
    ok 38 should be equal
    # triton network create
    #   cleanup: rm network nodetritontest-network-bluesteel.local if exists
    #  triton network create -h
    ok 39 null
    ok 40 (unnamed assert)
    #  triton network help create
    ok 41 null
    ok 42 (unnamed assert)
    #  triton network create
    ok 43 (unnamed assert)
    ok 44 (unnamed assert)
    #  triton network create VLAN
    not ok 45 VError: exec error: command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 exit status: 1 stdout: stderr: triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x) usage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2 triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x) usage: triton network create [OPTIONS] VLAN 
      ---
        operator: error
        expected: |-
          undefined
        actual: |-
          { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
        at: Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
        stack: |-
          VError: exec error:
          	command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
          	exit status: 1
          	stdout:
          
          	stderr:
          triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
          usage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
          triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
          usage: triton network create [OPTIONS] VLAN
          
              at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27
              at ChildProcess.exithandler (child_process.js:207:5)
              at emitTwo (events.js:87:13)
              at ChildProcess.emit (events.js:172:7)
              at maybeClose (internal/child_process.js:862:16)
              at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
      ...
    triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
    usage: triton network create [OPTIONS] VLAN
    ] killed: false, code: 1, signal: null, cmd: '/bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2' }, jse_info: {}, jse_shortmsg: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN', message: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN\n' }
    not ok 46 undefined: error body
      ---
        operator: deepEqual
        expected: {}
        actual:   undefined
        at: Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:73:11)
      ...
    # triton network delete
    #  triton network delete -h
    ok 47 null
    ok 48 (unnamed assert)
    #  triton network help delete
    ok 49 null
    ok 50 (unnamed assert)
    #  triton network delete
    ok 51 (unnamed assert)
    ok 52 (unnamed assert)
    #  triton network delete ID
    not ok 53 create test network
      ---
        operator: error
        expected: |-
          undefined
        actual: |-
          { code: 1, jse_cause: { [Error: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
        at: Object.ifErr (/Users/trentm/joy/node-triton/test/lib/testcommon.js:71:7)
        stack: |-
          VError: exec error:
          	command: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
          	exit status: 1
          	stdout:
          
          	stderr:
          triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
          usage: triton network create [OPTIONS] VLAN: Command failed: /bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2
          triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
          usage: triton network create [OPTIONS] VLAN
          
              at /Users/trentm/joy/node-triton/test/lib/testcommon.js:48:27
              at ChildProcess.exithandler (child_process.js:207:5)
              at emitTwo (events.js:87:13)
              at ChildProcess.emit (events.js:172:7)
              at maybeClose (internal/child_process.js:862:16)
              at Process.ChildProcess._handle.onexit (internal/child_process.js:222:5)
      ...
    triton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)
    usage: triton network create [OPTIONS] VLAN
    ] killed: false, code: 1, signal: null, cmd: '/bin/sh -c /Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2' }, jse_info: {}, jse_shortmsg: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network create [OPTIONS] VLAN', message: 'exec error:\n\tcommand: /bin/sh,-c,/Users/trentm/opt/node-4.9.1/bin/node /Users/trentm/joy/node-triton/bin/triton network create --name=nodetritontest-network-bluesteel.local --subnet=192.168.97.0/24 --start_ip=192.168.97.1 --end_ip=192.168.97.254 -j 2\n\texit status: 1\n\tstdout:\n\n\tstderr:\ntriton network create: error (Usage): without a --gateway (-g), you must specify --no-nat (-x)\nusage: triton network c

Comments

Comment by Former user
Created at 2019-04-09T21:57:55.095Z

It looks like this usage error message was added in https://github.com/joyent/node-triton/issues/255
I suspect the test case was doing it wrong initially, but I gather the test suite wasn't run for this change.


Comment by Former user
Created at 2019-04-17T17:32:40.932Z
Updated at 2022-07-11T19:58:13.401Z

As of [https://mnx.atlassian.net/browse/TRITON-1409|https://mnx.atlassian.net/browse/TRITON-1409|smart-link], the node-triton tests will skip this test by default. To repro this test failure:

make test-integration TEST_GLOB=cli-networks TEST_KNOWN_FAIL=1

Comment by Jira Bot
Created at 2022-07-27T22:44:46.695Z

node-triton commit 7e8273c53cb28b9c7da34bb9545fee44009fd6d7 (branch master, by Brian Bennett)

TRITON-1389 node-triton tests: cli-networks.test.js fails TOOLS-2543 MNX Tooling updates (#327)

TRITON-1389 node-triton tests: cli-networks.test.js fails
TOOLS-2543 MNX Tooling updates
Reviewed by: Dan McDonald <danmcd@kebe.com>
Reviewed by: Travis Paul <Tr@visPaul.me>


Comment by Brian Bennett
Created at 2022-07-27T22:45:39.412Z

At long last, all of these tests pass properly.


Comment by Jira Bot
Created at 2022-08-10T14:16:16.425Z

node-triton commit 9736983f1ef0408da60419a374166eb1ea844059 (branch master, by Travis Paul)

TRITON-1389 Fix TypeError when invoking `triton rbac info`. (#328)

When invoking `triton rbac info` using a profile that has at least one role
and one subuser the command will fail with a TypeError.

Add check for existence of property and fix another previously unreached bug
where an object was being indexed by another object instead of a string.