|
|
@ -16,8 +16,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
package org.springframework.boot.image.assertions;
|
|
|
|
package org.springframework.boot.image.assertions;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.List;
|
|
|
|
import java.util.Map;
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
import java.util.Objects;
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
import java.util.function.Consumer;
|
|
|
|
|
|
|
|
|
|
|
|
import com.github.dockerjava.api.model.ContainerConfig;
|
|
|
|
import com.github.dockerjava.api.model.ContainerConfig;
|
|
|
@ -100,13 +102,12 @@ public class ContainerConfigAssert extends AbstractAssert<ContainerConfigAssert,
|
|
|
|
return this.actual.extractingJsonPathArrayValue("$.buildpacks[*].id");
|
|
|
|
return this.actual.extractingJsonPathArrayValue("$.buildpacks[*].id");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@SuppressWarnings("unchecked")
|
|
|
|
|
|
|
|
public AbstractListAssert<?, List<? extends String>, String, ObjectAssert<String>> processOfType(String type) {
|
|
|
|
public AbstractListAssert<?, List<? extends String>, String, ObjectAssert<String>> processOfType(String type) {
|
|
|
|
return this.actual.extractingJsonPathArrayValue("$.processes[?(@.type=='%s')]", type)
|
|
|
|
return this.actual.extractingJsonPathArrayValue("$.processes[?(@.type=='%s')]", type)
|
|
|
|
.singleElement()
|
|
|
|
.singleElement()
|
|
|
|
.extracting("command", "args")
|
|
|
|
.extracting("command", "args")
|
|
|
|
.flatExtracting((list) -> (List<String>) list);
|
|
|
|
.flatMap((list) -> (list != null) ? ((List<?>) list).stream().map(Objects::toString).toList()
|
|
|
|
|
|
|
|
: Collections.emptyList());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|