[go: up one dir, main page]

Tezt-cloud: Fix network issue for macos users of docker run

What

In the tezt-cloud scenarios the docker run always used the --network "host" argument, which is not supported for macOS. Therefore, in this MR, we use the --macosx argument already defined to determine the presence of this --network argument.

Why

How

Manually testing the MR

On a macOS environment, before the MR:

$ dune exec tezt/tests/cloud/main.exe -- cloud health --localhost -v --tezt-cloud octez  # Need to add RELEASE_TAG
...
[docker#1] docker run --rm --name octez-001 --network host -p 30000-30049:30000-30049 octez -D -p 30000 -e
...
ssh: connect to host localhost port 30000: Connection refused
...
(repeats indefinitely)

After this MR:

$ dune exec tezt/tests/cloud/main.exe -- cloud health --localhost -v --tezt-cloud octez --macosx # Notice the macosx argument

should give

...
[docker#1] docker run --rm --name octez-001 -p 30000-30049:30000-30049 octez -D -p 30000 -e
...
[ssh#0] check
...
[agent0] echo 'Hello world'
...
[SUCCESS] (1/1) Simple health check to check local configuration

For other OS, this does nothing differently.

Checklist

  • Document the interface of any function added or modified (see the coding guidelines)
  • Document any change to the user interface, including configuration parameters (see node configuration)
  • Provide automatic testing (see the testing guide).
  • For new features and bug fixes, add an item in the appropriate changelog (docs/protocols/alpha.rst for the protocol and the environment, CHANGES.rst at the root of the repository for everything else).
  • Select suitable reviewers using the Reviewers field below.
  • Select as Assignee the next person who should take action on that MR

Merge request reports

Loading