Skip to content

Commit

Permalink
preflight: Don't warn/fail when bundle is not embedded
Browse files Browse the repository at this point in the history
Currently, on binaries without an embedded bundle, a warning will be
printed at the end of setup. This is not needed, we'll error out at
start time if no appropriate bundle can be found.
  • Loading branch information
cfergeau authored and gbraad committed Sep 27, 2019
1 parent 208dc04 commit 3a3d27f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
2 changes: 1 addition & 1 deletion cmd/crc/cmd/config/config.go
Expand Up @@ -23,7 +23,7 @@ var (
SkipCheckVirtualBoxInstalled = cfg.AddSetting("skip-check-virtualbox-installed", nil, []cfg.ValidationFnType{cfg.ValidateBool}, []cfg.SetFn{cfg.SuccessfullyApplied})
WarnCheckVirtualBoxInstalled = cfg.AddSetting("warn-check-virtualbox-installed", nil, []cfg.ValidationFnType{cfg.ValidateBool}, []cfg.SetFn{cfg.SuccessfullyApplied})
SkipCheckBundleCached = cfg.AddSetting("skip-check-bundle-cached", nil, []cfg.ValidationFnType{cfg.ValidateBool}, []cfg.SetFn{cfg.SuccessfullyApplied})
WarnCheckBundleCached = cfg.AddSetting("warn-check-bundle-cached", true, []cfg.ValidationFnType{cfg.ValidateBool}, []cfg.SetFn{cfg.SuccessfullyApplied})
WarnCheckBundleCached = cfg.AddSetting("warn-check-bundle-cached", nil, []cfg.ValidationFnType{cfg.ValidateBool}, []cfg.SetFn{cfg.SuccessfullyApplied})
)

var (
Expand Down
3 changes: 3 additions & 0 deletions pkg/crc/preflight/preflight_checks_common.go
Expand Up @@ -15,6 +15,9 @@ import (
)

func checkBundleCached() (bool, error) {
if !constants.BundleEmbedded() {
return true, nil
}
if _, err := os.Stat(constants.DefaultBundlePath); os.IsNotExist(err) {
return false, err
}
Expand Down
1 change: 0 additions & 1 deletion test/integration/features/basic.feature
Expand Up @@ -54,7 +54,6 @@ Feature: Basic test
And stdout should contain "Will use root access: execute systemctl daemon-reload command"
And stdout should contain "Will use root access: execute systemctl stop/start command"
And stdout should contain "Unpacking bundle from the CRC binary"
And stdout should contain "CRC bundle is not embedded in the binary"
And stdout should contain "Setup is complete, you can now run 'crc start -b $bundlename' to start a CodeReady Containers instance"

@darwin
Expand Down

0 comments on commit 3a3d27f

Please sign in to comment.