Skip to content

Commit

Permalink
Issue minishift#2318 Fix preflight check for extra-clusterup-flags
Browse files Browse the repository at this point in the history
Signed-off-by: Lalatendu Mohanty <lmohanty@redhat.com>
  • Loading branch information
LalatenduMohanty committed Apr 20, 2018
1 parent 0763284 commit a31f795
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cmd/minishift/cmd/artifact_preflight.go
Expand Up @@ -54,6 +54,11 @@ func artifactsCheckSucceedsOrFails(execute artifactCheckFunc, message string, er
func checkOcFlag() bool {
clusterUpParams := determineInitialClusterupParameters()
for _, key := range clusterUpParams {

// --extra-clusterup-flags is a minishift flag
if key == configCmd.ExtraClusterUpFlags.Name {
continue
}
if !oc.SupportFlag(key, ocPath, &util.RealRunner{}) {
fmt.Printf("Flag '%s' is not supported for oc version %s. Use 'openshift-version' flag to select a different version of OpenShift.\n", key, viper.GetString(configCmd.OpenshiftVersion.Name))
return false
Expand Down
8 changes: 8 additions & 0 deletions test/integration/features/flags.feature
Expand Up @@ -50,3 +50,11 @@ Feature: Flags
Given Minishift has state "Running"
When executing "minishift delete --force" succeeds
Then Minishift should have state "Does Not Exist"

Scenario: Starting Minishift with extra-clusterup-flags
Given Minishift has state "Does Not Exist"
And image caching is disabled
When executing "MINISHIFT_ENABLE_EXPERIMENTAL=y minishift start --extra-clusterup-flags \"--service-catalog\"" succeeds
Then Minishift should have state "Running"
When executing "minishift delete --force" succeeds
Then Minishift should have state "Does Not Exist"

0 comments on commit a31f795

Please sign in to comment.