@Test public void simpleTest() { final List<String> hosts = ImmutableList.of("one:one", "two:two"); final AddExtraHostContainerDecorator decorator = new AddExtraHostContainerDecorator(hosts); final HostConfig.Builder hostBuilder = HostConfig.builder(); decorator.decorateHostConfig(null, Optional.absent(), hostBuilder); final HostConfig config = hostBuilder.build(); assertThat(config.extraHosts(), equalTo(hosts)); }
@Override public void decorateHostConfig(final Job job, final Optional<String> dockerVersion, final HostConfig.Builder hostConfig) { hostConfig.extraHosts(this.extraHosts); }
AddExtraHostContainerDecorator implements ContainerDecorator { @Override public void decorateHostConfig(final Job job, final Optional<String> dockerVersion, final HostConfig.Builder hostConfig) { hostConfig.extraHosts(this.extraHosts); } }
AddExtraHostContainerDecorator implements ContainerDecorator { @Override public void decorateHostConfig(final Job job, final Optional<String> dockerVersion, final HostConfig.Builder hostConfig) { hostConfig.extraHosts(this.extraHosts); } AddExtraHostContainerDecorator(final List<String> extraHosts); }
AddExtraHostContainerDecorator implements ContainerDecorator { @Override public void decorateHostConfig(final Job job, final Optional<String> dockerVersion, final HostConfig.Builder hostConfig) { hostConfig.extraHosts(this.extraHosts); } AddExtraHostContainerDecorator(final List<String> extraHosts); @Override void decorateHostConfig(final Job job, final Optional<String> dockerVersion,
                                 final HostConfig.Builder hostConfig); @Override void decorateContainerConfig(final Job job, final ImageInfo imageInfo,
                                      final Optional<String> dockerVersion,
                                      final ContainerConfig.Builder containerConfig); static boolean isValidArg(String arg); }
AddExtraHostContainerDecorator implements ContainerDecorator { @Override public void decorateHostConfig(final Job job, final Optional<String> dockerVersion, final HostConfig.Builder hostConfig) { hostConfig.extraHosts(this.extraHosts); } AddExtraHostContainerDecorator(final List<String> extraHosts); @Override void decorateHostConfig(final Job job, final Optional<String> dockerVersion,
                                 final HostConfig.Builder hostConfig); @Override void decorateContainerConfig(final Job job, final ImageInfo imageInfo,
                                      final Optional<String> dockerVersion,
                                      final ContainerConfig.Builder containerConfig); static boolean isValidArg(String arg);  }