Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 5 additions & 9 deletions hack/lib/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -522,15 +522,11 @@ function os::start::internal::openshift_executable() {

openshift_executable="${sudo} docker run ${docker_options} ${volumes} ${envvars} openshift/origin:${version}"
else
local envvars=""
if [[ -n "${ENV:-}" ]]; then
envvars="env "
for envvar in "${ENV[@]}"; do
envvars+="${envvar} "
done
fi

openshift_executable="${sudo} ${envvars} $(which openshift)"
if [[ -n "${sudo}" ]]; then
openshift_executable="${sudo} -E $(which openshift)"
else
openshift_executable="$(which openshift)"
fi
fi

echo "${openshift_executable}"
Expand Down
2 changes: 1 addition & 1 deletion test/cmd/admin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ trap os::test::junit::reconcile_output EXIT
oc delete identities/anypassword:cascaded-user
oc adm policy reconcile-cluster-roles --confirm --additive-only=false
oc adm policy reconcile-cluster-role-bindings --confirm --additive-only=false
) &>/dev/null
)

project="$( oc project -q )"

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/annotations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/annotate"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/authentication.sh
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,10 @@ fi
# Cleanup cluster resources created by this test
(
set +e
oc delete oauthaccesstokens --all
oc delete oauthaccesstokens --all --loglevel=8
oc adm policy remove-cluster-role-from-user cluster-debugger user3
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/authentication"

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/basicresources.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ trap os::test::junit::reconcile_output EXIT
oc delete all,templates,secrets,pods,jobs --all
oc delete image v1-image
oc delete group patch-group
oc delete project test-project-admin
oc delete project test-project-admin --loglevel=8
exit 0
) &>/dev/null
)

function escape_regex() {
sed 's/[]\.|$(){}?+*^]/\\&/g' <<< "$*"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/builds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


url=":${API_PORT:-8443}"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates,secrets --all
oc delete all,templates,secrets --all --loglevel=8
exit 0
) &>/dev/null
)

# check to make sure that "get"ting a resource with no config file present
# still returns error indicating that no config-file is set
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/convert.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all --all
oc delete all --all --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/convert"
# This test validates the convert command
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/create.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/create"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/debug.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/debug"
# This test validates the debug command
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/deployments.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/deployments"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/describer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/describe"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/dns.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete svc,endpoints --all
oc delete svc,endpoints --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/dns"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/edit.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/edit"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/explain.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/explain"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/export.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/export"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/get.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/get"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/idle.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)

project="$(oc project -q)"
idled_at_annotation='idling.alpha.openshift.io/idled-at'
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/image-lookup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,is,pods --all
oc delete all,is,pods --all --loglevel=8

exit 0
) &> /dev/null
)

project="$( oc project -q )"

Expand Down
6 changes: 3 additions & 3 deletions test/cmd/images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,11 @@ trap os::test::junit::reconcile_output EXIT
os::cmd::expect_success 'oc login -u system:admin'
cluster_admin_context="$( oc config current-context )"
os::cmd::expect_success "oc config use-context '${original_context}'"
oc delete project test-cmd-images-2 merge-tags --context=${cluster_admin_context}
oc delete all,templates --all --context=${cluster_admin_context}
oc delete project test-cmd-images-2 merge-tags --context=${cluster_admin_context} --loglevel=8
oc delete all,templates --all --context=${cluster_admin_context} --loglevel=8

exit 0
) &> /dev/null
)

project="$( oc project -q )"

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/login.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete project project-foo
oc delete project project-foo --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/login"
# This test validates login functionality for the client
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/migrate.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all --all
oc delete all --all --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/migrate"
# This test validates storage migration
Expand Down
6 changes: 3 additions & 3 deletions test/cmd/newapp.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ trap os::test::junit::reconcile_output EXIT
(
set +e
# oc delete all,templates --all
oc delete-project template-substitute
oc delete-project prefix-template-substitute
oc delete project template-substitute --loglevel=8
oc delete project prefix-template-substitute --loglevel=8
exit 0
) &>/dev/null
)

os::util::environment::setup_time_vars

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/quota.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@ os::test::junit::declare_suite_start "cmd/quota"
# Cleanup cluster resources created by this test suite
(
set +e
oc delete project quota-{foo,bar,asmail,images}
oc delete project quota-{foo,bar,asmail,images} --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/quota/clusterquota"

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/registry.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all --all
oc delete all --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/registry/login"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/router.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ trap os::test::junit::reconcile_output EXIT
(
set +e
oc adm policy remove-scc-from-user privileged -z router
oc delete sa/router -n default
oc delete sa/router -n default --loglevel=8
exit 0
) &>/dev/null
)

defaultimage="openshift/origin-\${component}:latest"
USE_IMAGES=${USE_IMAGES:-$defaultimage}
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/routes.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete route foo bar testroute test-route new-route
oc delete route foo bar testroute test-route new-route --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/routes"
Expand Down
10 changes: 5 additions & 5 deletions test/cmd/sdn.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete namespace sdn-test-1
oc delete namespace sdn-test-2
oc delete namespace sdn-test-3
oc delete egressnetworkpolicy --all
oc delete namespace sdn-test-1 --loglevel=8
oc delete namespace sdn-test-2 --loglevel=8
oc delete namespace sdn-test-3 --loglevel=8
oc delete egressnetworkpolicy --all --loglevel=8
exit 0
) &>/dev/null
)

os::test::junit::declare_suite_start "cmd/sdn"

Expand Down
4 changes: 2 additions & 2 deletions test/cmd/secrets.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates,secrets --all
oc delete all,templates,secrets --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/secrets"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/services.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all --loglevel=8
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/create-service-nodeport"
Expand Down
4 changes: 2 additions & 2 deletions test/cmd/set-image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ trap os::test::junit::reconcile_output EXIT
# Cleanup cluster resources created by this test
(
set +e
oc delete all,templates --all
oc delete all,templates --all &>/dev/null
exit 0
) &>/dev/null
)


os::test::junit::declare_suite_start "cmd/oc/set/image"
Expand Down
Loading