Skip to content

Commit

Permalink
add coreos image installer cli arg
Browse files Browse the repository at this point in the history
  • Loading branch information
carbonin committed Jan 16, 2025
1 parent 5913bff commit 89cbaa5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/commands/actions/install_cmd.go
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,10 @@ func (a *install) getFullInstallerCommand() string {
installerCmdArgs = append(installerCmdArgs, "--service-ips", strings.Join(a.installParams.ServiceIps, ","))
}

if len(a.installParams.CoreosImage) > 0 {
installerCmdArgs = append(installerCmdArgs, "--coreos-image", a.installParams.CoreosImage)
}

return fmt.Sprintf("%s %s %s", shellescape.QuoteCommand(podmanCmd), swag.StringValue(a.installParams.InstallerImage),
shellescape.QuoteCommand(installerCmdArgs))
}
Expand Down
5 changes: 5 additions & 0 deletions src/commands/actions/install_cmd_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -421,4 +421,9 @@ var _ = Describe("installer test", func() {

})

It("Args adds the CoreosImage from the install command request when set", func() {
installCommandRequest.CoreosImage = "example.com/openshift/coreos:tag"
args := getInstall(installCommandRequest, filesystem, false).Args()
Expect(strings.Join(args, " ")).To(ContainSubstring("--coreos-image example.com/openshift/coreos:tag"))
})
})

0 comments on commit 89cbaa5

Please sign in to comment.