Skip to content

Commit

Permalink
WIP fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
smarterclayton committed Jul 19, 2018
1 parent 7a8e1a9 commit 728864e
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 9 deletions.
6 changes: 2 additions & 4 deletions hack/lib/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,14 @@ function os::start::internal::configure_master() {
openshift_executable="$(os::start::internal::openshift_executable "${version}")"

os::log::debug "Creating master configuration for the OpenShift server"
${openshift_executable} start \
${openshift_executable} start master \
--create-certs=false \
--images="${USE_IMAGES}" \
--master="${MASTER_ADDR}" \
--dns="tcp://${API_HOST}:53" \
--hostname="${KUBELET_HOST}" \
--volume-dir="${VOLUME_DIR}" \
--etcd-dir="${ETCD_DATA_DIR}" \
--network-plugin="${NETWORK_PLUGIN:-}" \
--write-config="${SERVER_CONFIG_DIR}" \
--write-config="${SERVER_CONFIG_DIR}/master" \
--listen="${API_SCHEME}://${API_BIND_HOST}:${API_PORT}" \
--public-master="${API_SCHEME}://${PUBLIC_MASTER_HOST}:${API_PORT}"

Expand Down
3 changes: 3 additions & 0 deletions pkg/cmd/server/start/start_network.go
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,9 @@ func (o NodeOptions) RunNode() error {
// After this call returns without an error, config files will exist on disk. It also returns
// a string for messages indicating which config file contains the config.
func (o NodeOptions) resolveNodeConfig() (*configapi.NodeConfig, string, error) {
if len(o.ConfigFile) == 0 {
return nil, "", fmt.Errorf("you must specify a configuration file with --config")
}
glog.V(2).Infof("Reading node configuration from %s", o.ConfigFile)
cfg, err := configapilatest.ReadAndResolveNodeConfig(o.ConfigFile)
return cfg, o.ConfigFile, err
Expand Down
4 changes: 1 addition & 3 deletions pkg/oc/clusterup/coreinstall/kubelet/flags.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,6 @@ func (opt KubeletStartFlags) MakeKubeletFlags(dockerClient dockerhelper.Interfac
}

createFlagsCmd := []string{
"start", "node",
"--write-flags",
"--config=/var/lib/origin/openshift.local.config/node/node-config.yaml",
}

Expand All @@ -46,7 +44,7 @@ func (opt KubeletStartFlags) MakeKubeletFlags(dockerClient dockerhelper.Interfac
Bind(binds...).
Env(env...).
SaveContainerLogs(componentName, path.Join(basedir, "logs")).
Entrypoint("openshift").
Entrypoint("openshift-node-config").
Command(createFlagsCmd...).Output()
if err != nil {
return "", errors.NewError("could not run %q: %v", componentName, err).WithCause(err)
Expand Down
2 changes: 1 addition & 1 deletion test/cmd/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ os::test::junit::declare_suite_start "cmd/admin"

os::test::junit::declare_suite_start "cmd/admin/start"
# Check failure modes of various system commands
os::cmd::expect_failure_and_text 'openshift start network' 'kubeconfig must be set'
os::cmd::expect_failure_and_text 'openshift start network' 'you must specify a configuration file with --config'
os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --enable=kubelet' 'the following components are not recognized: kubelet'
os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --enable=kubelet,other' 'the following components are not recognized: kubelet, other'
os::cmd::expect_failure_and_text 'openshift start network --config=${NODECONFIG} --disable=other' 'the following components are not recognized: other'
Expand Down
2 changes: 1 addition & 1 deletion test/cmd/help.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ os::cmd::expect_success_and_text 'oc login --help' 'insecure-skip-tls-verify'

# help for given command with --help flag must be consistent
os::cmd::expect_success_and_text 'oc get --help' 'Display one or many resources'
os::cmd::expect_success_and_text 'openshift start --help' 'Launch OpenShift components'
os::cmd::expect_success_and_text 'openshift start --help' 'Start components of OpenShift'
os::cmd::expect_success_and_text 'openshift start master --help' 'Start a master'
os::cmd::expect_success_and_text 'openshift start network --help' 'Start networking'
os::cmd::expect_success_and_text 'oc project --help' 'Switch to another project'
Expand Down

0 comments on commit 728864e

Please sign in to comment.