Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide the full command #503

Merged
merged 1 commit into from
Aug 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions junit5/src/main/java/cz/xtf/junit5/model/DockerImageMetadata.java
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,21 @@ public Map<String, String> envs() {

/**
* Returns default container command on Config/Cmd path
* If command consists of more parts, the space-separated string of all those parts is returned.
*
* @return default command
*/
public String command() {
List<String> cmdList = (List<String>) getConfig().get(METADATA_CONFIG_CMD);
return cmdList.get(0);
return String.join(" ", commandList());
}

/**
* Returns default container command on Config/Cmd path - return all parts as a list
*
* @return default command list
*/
public List<String> commandList() {
return (List<String>) getConfig().get(METADATA_CONFIG_CMD);
}

/**
Expand Down