Skip to content

Commit

Permalink
Remove useless --mirror flag in kubernetes install command
Browse files Browse the repository at this point in the history
  • Loading branch information
cbosdo committed Jan 9, 2025
1 parent 3a71298 commit b22d247
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions mgradm/cmd/install/podman/podman.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ NOTE: installing on a remote podman is not supported yet!
},
}

adm_utils.AddMirrorFlag(cmd)
shared.AddInstallFlags(cmd)
podman.AddPodmanArgFlag(cmd)

Expand Down
2 changes: 2 additions & 0 deletions mgradm/cmd/install/podman/podman_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,15 @@ import (

func TestParamsParsing(t *testing.T) {
args := flagstests.InstallFlagsTestArgs()
args = append(args, flagstests.MirrorFlagTestArgs...)
args = append(args, flagstests.PodmanFlagsTestArgs...)
args = append(args, "srv.fq.dn")

// Test function asserting that the args are properly parsed
tester := func(_ *types.GlobalFlags, flags *podmanInstallFlags,
_ *cobra.Command, args []string,
) error {
flagstests.AssertMirrorFlag(t, flags.Mirror)
flagstests.AssertInstallFlags(t, &flags.ServerFlags)
flagstests.AssertPodmanInstallFlags(t, &flags.Podman)
testutils.AssertEquals(t, "Wrong FQDN", "srv.fq.dn", args[0])
Expand Down
1 change: 0 additions & 1 deletion mgradm/cmd/install/shared/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ func AddInspectFlags(cmd *cobra.Command) {

// AddInstallFlags add flags to installa command.
func AddInstallFlags(cmd *cobra.Command) {
cmd_utils.AddMirrorFlag(cmd)
cmd.Flags().String("tz", "", L("Time zone to set on the server. Defaults to the host timezone"))
cmd.Flags().String("email", "[email protected]", L("Administrator e-mail"))
cmd.Flags().String("emailfrom", "[email protected]", L("E-Mail sending the notifications"))
Expand Down
2 changes: 0 additions & 2 deletions shared/testutils/flagstests/mgradm_install.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@ var InstallFlagsTestArgs = func() []string {
"--organization", "someorg",
}

args = append(args, MirrorFlagTestArgs...)
args = append(args, SCCFlagTestArgs...)
args = append(args, ImageFlagsTestArgs...)
args = append(args, CocoFlagsTestArgs...)
Expand Down Expand Up @@ -96,7 +95,6 @@ func AssertInstallFlags(t *testing.T, flags *utils.ServerFlags) {
testutils.AssertEquals(t, "Error parsing --admin-firstName", "adminfirst", flags.Installation.Admin.FirstName)
testutils.AssertEquals(t, "Error parsing --admin-lastName", "adminlast", flags.Installation.Admin.LastName)
testutils.AssertEquals(t, "Error parsing --organization", "someorg", flags.Installation.Organization)
AssertMirrorFlag(t, flags.Mirror)
AssertSCCFlag(t, &flags.Installation.SCC)
AssertImageFlag(t, &flags.Image)
AssertCocoFlag(t, &flags.Coco)
Expand Down

0 comments on commit b22d247

Please sign in to comment.