runconfig: validateNetContainerMode: simplify validation#48554
Conversation
thaJeztah
commented
Sep 26, 2024
- use an early return if we're not using container-mode, instead of checking multiple times
- use ConnectedContainer() method to check if a container is specified
|
Oh! Looks like failure is related; will need to check the test to see if the test is bad, or if we regressed; |
|
Ah! So yeah, I guess the test is "correct" (but not something we clearly define). Basically the test validates that moby/integration-cli/docker_cli_netmode_test.go Lines 58 to 59 in 62120a7 I can fix this validation, but we should probably look if |
- use an early return if we're not using container-mode, instead of checking multiple times - use ConnectedContainer() method to check if a container is specified Signed-off-by: Sebastiaan van Stijn <[email protected]>
6b8d24c to
e6488c9
Compare