port commands
Port commands manage test ports.
port list
port list
command lists registered ports.
Usage
port list [options]
Options
- -t, --target: shows ports for specfied target.
- -i, --idle: shows only idle ports.
- idle ports refer to ports that are not running any tests.
- --throwOnError: throw error on failure.
Examples
coordinator # port list // Shows all ports
coordinator # port list -t dev // Shows all ports with 'dev' tag
coordinator # port list -i // Shows all idle ports
port change-name
port change-name
command changes the name of a port.
Usage
port change-name [options] <target> <newname>
Arguments
- target: selects a port usign a port's name.
- newname: the selected port's new name.
Options
- --throwOnError: throw error on failure
Examples
coordinator # port change-name port1 porta // Changes port1's name to 'porta'
port assign
port assign
command adds tags to a port or selected target ports.
Usage
port assign [options] <target> <tags>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
- tags: new tags to be added to the selected target port or ports.
- multiple tags can be added when separated by commas.
Options
- -q, --quiet: mutes console outputs.
- --throwOnError: throw error on failure.
Examples
coordinator # port assign port1 dev // Assigns tag 'dev' to a port 'port1'
coordinator # port assign port1 dev,prod // Assigns tags 'dev' and 'prod' to a port 'port1'
port unassign
port unassign
command remove tags from a port or selected target ports.
Usage
port unassign [options] <target> <tags>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
- tags: existing tags to be removed from the selected target port or ports.
- multiple tags can be removed when separated by commas.
Options
- -q, --quiet: mutes console outputs.
- --throwOnError: throw error on failure.
Examples
coordinator # port assign port1 dev // Assigns tag 'dev' to a port 'port1'
coordinator # port assign port2 dev // Assigns tag 'dev' to a port 'port2'
coordinator # port unassign dev dev // Unassigns tag `dev' from all ports that have the 'dev' tag
coordinator # port unassign all prod,beta // Unassigns tags 'prod' and 'beta' from all ports
port reserve
port reserve
reserve target ports (specify --idle for reserving idle ports)
Usage
port reserve <target> [options]
Arguments
target
: The target port.
Options
- -q, --quiet: mute console outputs
- --idle: reserve idle ports instead of target ports
- --min
<min>
: Minimum number of ports to reserve (only used with --idle) - --max
<max>
: Maximum number of ports to reserve (only used with --idle) - -i, --intervalDuration
<interval>
: Interval duration before retrying (only used with --idle) - -t, --tag
<tag>
: Tag to add to reserved ports (only used with --idle) - --throwOnError: throw error on failure
Examples
// Reserve a specific target port
port reserve serverhost-p23
// Reserve idle ports and specify minimum and maximum number of ports to reserve
port reserve serverhost-p54 --idle --min 5 --max 10
// Reserve idle ports with a tag and interval duration
port reserve serverhost-p46 --idle --tag "example-tag" --intervalDuration 30
port unreserve
port unreserve
command unreserve target ports so that tests can run at the
unreserved ports.
Usage
port unreserve [options] <target>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
Options
- -q, --quiet: mutes console outputs.
- --throwOnError: throw error on failure.
Examples
coordinator # port unreserve all // unreserves all ports
coordinator # port unreserve porta // unreserves a port 'porta'
port add-context
port add-context
add a context key/pair to a port or selected target ports.
Usage
port add-context [options] <target> <name> <value>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
- name: a context name to add.
- value: a context value for the given name.
Options
- -q, --quiet: mutes console outputs.
- --throwOnError: throw error on failure.
Examples
coordinator # port add-context all hello world // Adds a context hello=world to all ports
coordinator # port add-context dev new world // Adds a context new=world to all ports with 'dev' tag
port clear-contexts
port clear-contexts
command clears all contexts previously configured from
selected target ports.
Usage
port clear-contexts [options] <target>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
Options
- -q, --quiet: mutes console outputs.
- --throwOnError: throw error on failure.
Examples
coordinator # port clear-contexts all // Removes contexts from all ports
coordinator # port clear-contexts dev // Removes contexts from all ports with 'dev' tag
port remove-context
port remove-context
removes a context key/pair from a port or selected target
ports.
Usage
port remove-context [options] <target> <name>
Arguments
- target: selects a port or ports using a port's name or a tag.
all
can be used to select all ports.
- name: a context name to remove.
Options
- -q, --quiet: mutes console outputs.
Examples
coordinator # port remove-context all hello // Removes a context 'name' from all ports
coordinator # port remove-context dev hello // Removes a context 'name from all ports with 'dev' tag