... | ... |
@@ -164,6 +164,9 @@ func (o AllInOneOptions) Validate(args []string) error { |
164 | 164 |
return errors.New("config directory must have a value") |
165 | 165 |
} |
166 | 166 |
|
167 |
+ if len(o.NodeArgs.NodeName) == 0 { |
|
168 |
+ return errors.New("--hostname must have a value") |
|
169 |
+ } |
|
167 | 170 |
// if we are not starting up using a config file, run the argument validation |
168 | 171 |
if !o.IsRunFromConfig() { |
169 | 172 |
if err := o.MasterOptions.MasterArgs.Validate(); err != nil { |
... | ... |
@@ -45,6 +45,7 @@ os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} |
45 | 45 |
os::cmd::expect_failure_and_text 'openshift start node' 'kubeconfig must be set' |
46 | 46 |
os::cmd::expect_failure_and_text 'openshift start node --config=${NODECONFIG} --disable=other' 'the following components are not recognized: other' |
47 | 47 |
os::cmd::expect_failure_and_text 'openshift start node --config=${NODECONFIG} --disable=kubelet,proxy,plugins' 'at least one node component must be enabled \(kubelet, plugins, proxy\)' |
48 |
+os::cmd::expect_failure_and_text 'openshift start --write-config=/tmp/test --hostname=""' 'error: --hostname must have a value' |
|
48 | 49 |
os::test::junit::declare_suite_end |
49 | 50 |
|
50 | 51 |
os::test::junit::declare_suite_start "cmd/admin/manage-node" |