fix(reims): drop uncalled PostCreateSetOpts and PreviewCreateCommand wrappers
This commit is contained in:
1 parent
d40327e724
commit
ed1a0ba254
2 files changed
+4
-12
No files matched your search
@@ -611,7 +611,7 @@ func TestCreateDefaultNVMeAndPreview(t *testing.T) {
|
||||
if EffectiveCreateCapture(opts) {
|
||||
t.Fatalf("EffectiveCreateCapture default = true, want false")
|
||||
}
|
||||
cmd, err := PreviewCreateCommand(opts)
|
||||
cmd, err := PreviewCreateCommandWithCapture(opts, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
@@ -621,7 +621,7 @@ func TestCreateDefaultNVMeAndPreview(t *testing.T) {
|
||||
opts.DiskController = "ahci"
|
||||
on := true
|
||||
opts.Capture = &on
|
||||
cmdAhciCaptureOn, err := PreviewCreateCommand(opts)
|
||||
cmdAhciCaptureOn, err := PreviewCreateCommandWithCapture(opts, true)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -445,13 +445,9 @@ func EffectiveCreateCapture(o CreateOpts) bool {
|
||||
return false
|
||||
}
|
||||
|
||||
// PostCreateSetOpts returns follow-up `reims-ctl set` options for defaults that
|
||||
// PostCreateSetOptsWithCapture returns follow-up `reims-ctl set` options for defaults that
|
||||
// `reims-ctl create` does not accept directly (upstream 3731afd defaults to
|
||||
// SATA/AHCI and capture=true).
|
||||
func PostCreateSetOpts(o CreateOpts) (SetOpts, bool) {
|
||||
return PostCreateSetOptsWithCapture(o, true)
|
||||
}
|
||||
|
||||
func PostCreateSetOptsWithCapture(o CreateOpts, captureSupported bool) (SetOpts, bool) {
|
||||
so := SetOpts{Name: o.Name}
|
||||
need := false
|
||||
@@ -467,11 +463,7 @@ func PostCreateSetOptsWithCapture(o CreateOpts, captureSupported bool) (SetOpts,
|
||||
return so, need
|
||||
}
|
||||
|
||||
// PreviewCreateCommand formats the exact CLI command shown on Step 5 of the wizard.
|
||||
func PreviewCreateCommand(o CreateOpts) (string, error) {
|
||||
return PreviewCreateCommandWithCapture(o, true)
|
||||
}
|
||||
|
||||
// PreviewCreateCommandWithCapture formats the exact CLI command shown on Step 5 of the wizard.
|
||||
func PreviewCreateCommandWithCapture(o CreateOpts, captureSupported bool) (string, error) {
|
||||
args, err := BuildCreateArgs(o)
|
||||
if err != nil {
|
||||
|
||||
Reference in new issue
Block a user