Skip to content
Merged
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
9 changes: 0 additions & 9 deletions hack/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -247,15 +247,6 @@ function install_registry() {
}
readonly -f install_registry

function wait_for_registry() {
local generation="$(oc get dc/docker-registry -o 'jsonpath={.metadata.generation}')"
local onereplicajs='{.status.observedGeneration},{.status.replicas},{.status.updatedReplicas},{.status.availableReplicas}'
wait_for_command "oc get dc/docker-registry -o 'jsonpath=${onereplicajs}' --config='${ADMIN_KUBECONFIG}' | grep '^${generation},1,1,1$'" "$((5*TIME_MIN))"
local readyjs='{.items[*].status.conditions[?(@.type=="Ready")].status}'
wait_for_command "oc get pod -l deploymentconfig=docker-registry -o 'jsonpath=${readyjs}' --config='${ADMIN_KUBECONFIG}' | grep -qi true" "${TIME_MIN}"
}
readonly -f wait_for_registry

# Wait for builds to start
# $1 namespace
function os::build:wait_for_start() {
Expand Down
4 changes: 2 additions & 2 deletions test/end-to-end/core.sh
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ os::cmd::expect_success "openshift admin policy add-scc-to-user privileged -z ip
os::cmd::expect_success "openshift admin ipfailover --images='${USE_IMAGES}' --virtual-ips='1.2.3.4' --service-account=ipfailover"

echo "[INFO] Waiting for Docker registry pod to start"
wait_for_registry
os::cmd::expect_success 'oc rollout status dc/docker-registry'

echo "[INFO] Waiting for IP failover to deploy"
os::cmd::expect_success 'oc rollout status dc/ipfailover'
Expand Down Expand Up @@ -536,7 +536,7 @@ echo "[INFO] Validated image pruning"
echo "[INFO] Configure registry to accept manifest V2 schema 2"
os::cmd::expect_success "oc project '${CLUSTER_ADMIN_CONTEXT}'"
os::cmd::expect_success 'oc env -n default dc/docker-registry REGISTRY_MIDDLEWARE_REPOSITORY_OPENSHIFT_ACCEPTSCHEMA2=true'
wait_for_registry
os::cmd::expect_success 'oc rollout status dc/docker-registry'
echo "[INFO] Registry configured to accept manifest V2 schema 2"

echo "[INFO] Accept manifest V2 schema 2"
Expand Down
2 changes: 1 addition & 1 deletion test/extended/cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ oc login -u system:admin -n default
oadm policy add-role-to-group view system:authenticated -n default

install_registry
wait_for_registry
oc rollout status dc/docker-registry

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Expect success here since you're in a jUnit context

docker_registry="$( oc get service/docker-registry -n default -o jsonpath='{.spec.clusterIP}:{.spec.ports[0].port}' )"

os::test::junit::declare_suite_start "extended/cmd"
Expand Down
2 changes: 1 addition & 1 deletion test/extended/gssapi.sh
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ os::start::server
export KUBECONFIG="${ADMIN_KUBECONFIG}"

install_registry
wait_for_registry
os::cmd::expect_success 'oc rollout status dc/docker-registry'

os::cmd::expect_success 'oc login -u system:admin'
os::cmd::expect_success "oc new-project ${project_name}"
Expand Down
2 changes: 1 addition & 1 deletion test/extended/ldap_groups.sh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ os::start::server
export KUBECONFIG="${ADMIN_KUBECONFIG}"

install_registry
wait_for_registry
oc rollout status dc/docker-registry

oc login ${MASTER_ADDR} -u ldap -p password --certificate-authority=${MASTER_CONFIG_DIR}/ca.crt
oc new-project openldap
Expand Down
2 changes: 1 addition & 1 deletion test/extended/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ function os::test::extended::setup () {

install_registry
if [[ -z "${SKIP_NODE:-}" ]]; then
wait_for_registry
oc rollout status dc/docker-registry
fi
DROP_SYN_DURING_RESTART=1 CREATE_ROUTER_CERT=1 install_router

Expand Down