Only test macvlan for API >= 1.24
@@ -3567,6 +3567,8 @@ public class DefaultDockerClientTest {
assertThat(bridgeDriverCreation.warnings(), anyOf(nullValue(String.class), equalTo("")));
sut.removeNetwork(bridgeDriverCreation.id());
+ if (dockerApiVersionAtLeast("1.24")) {
+ // These network drivers only exist in later versions
final NetworkConfig macvlanDriverConfig = networkConfigBuilder.name(randomName())
.driver("macvlan").build();
final NetworkCreation macvlanDriverCreation = sut.createNetwork(macvlanDriverConfig);
@@ -3575,8 +3577,6 @@ public class DefaultDockerClientTest {
assertThat(macvlanDriverCreation.warnings(), anyOf(nullValue(String.class), equalTo("")));
sut.removeNetwork(macvlanDriverCreation.id());
- if (dockerApiVersionAtLeast("1.24")) {
- // We are operating a swarm, so we can create an overlay network
final NetworkConfig overlayDriverConfig = networkConfigBuilder.name(randomName())
.driver("overlay").build();
final NetworkCreation overlayDriverCreation = sut.createNetwork(overlayDriverConfig);
