Assign separate ports for each appleHV machine

Previously, every machine created using appleHV interacted with VFKit using port 8081. This meant that if multiple machines existed on the machine, starting one would start all the machines. This patch assigns a separate random port for each machine, so machine commands interact with just the specified machine.

Signed-off-by: Ashley Cui <acui@redhat.com>
This commit is contained in:
Ashley Cui
2024-01-10 14:53:02 -05:00
parent eeff3d2de8
commit f6107f6319
4 changed files with 44 additions and 5 deletions

View File

@ -132,7 +132,7 @@ func (m *machineTestBuilder) setCmd(mc machineCommand) *machineTestBuilder {
return m
}
func (m *machineTestBuilder) setTimeout(timeout time.Duration) *machineTestBuilder {
func (m *machineTestBuilder) setTimeout(timeout time.Duration) *machineTestBuilder { //nolint: unparam
m.timeout = timeout
return m
}