Skip to content

Commit 28887fa

Browse files
committed
update tests
1 parent 4bdb0bd commit 28887fa

File tree

8 files changed

+22
-22
lines changed

8 files changed

+22
-22
lines changed

docs/cli_hacking_guide.adoc

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Commands are organized in the package structure as:
2929

3030
* https://github.com/openshift/origin/tree/master/pkg/oc[pkg/oc]
3131
** https://github.com/openshift/origin/tree/master/pkg/oc/cli[pkg/cmd/cli] - `oc` or `openshift cli`, and `kubectl` commands.
32-
** https://github.com/openshift/origin/tree/master/pkg/oc/experimental[pkg/cmd/experimental] - `openshift ex` command.
32+
** https://github.com/openshift/origin/tree/master/pkg/oc/experimental[pkg/cmd/experimental] - `oc ex` command.
3333

3434
=== Command Structure
3535

hack/lib/start.sh

+7-7
Original file line numberDiff line numberDiff line change
@@ -161,13 +161,13 @@ readonly -f os::start::internal::configure_master
161161
function os::start::internal::patch_master_config() {
162162
local sudo=${USE_SUDO:+sudo}
163163
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.orig.yaml"
164-
openshift ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig.yaml" --patch="{\"etcdConfig\": {\"address\": \"${API_HOST}:${ETCD_PORT}\"}}" | \
165-
openshift ex config patch - --patch="{\"etcdConfig\": {\"servingInfo\": {\"bindAddress\": \"${API_HOST}:${ETCD_PORT}\"}}}" | \
166-
openshift ex config patch - --type json --patch="[{\"op\": \"replace\", \"path\": \"/etcdClientInfo/urls\", \"value\": [\"${API_SCHEME}://${API_HOST}:${ETCD_PORT}\"]}]" | \
167-
openshift ex config patch - --patch="{\"etcdConfig\": {\"peerAddress\": \"${API_HOST}:${ETCD_PEER_PORT}\"}}" | \
168-
openshift ex config patch - --patch="{\"etcdConfig\": {\"peerServingInfo\": {\"bindAddress\": \"${API_HOST}:${ETCD_PEER_PORT}\"}}}" | \
169-
openshift ex config patch - --patch="{\"auditConfig\": {\"enabled\": true}}" | \
170-
openshift ex config patch - --patch="{\"imagePolicyConfig\": {\"maxImagesBulkImportedPerRepository\": ${MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY:-5}}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
164+
oc ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig.yaml" --patch="{\"etcdConfig\": {\"address\": \"${API_HOST}:${ETCD_PORT}\"}}" | \
165+
oc ex config patch - --patch="{\"etcdConfig\": {\"servingInfo\": {\"bindAddress\": \"${API_HOST}:${ETCD_PORT}\"}}}" | \
166+
oc ex config patch - --type json --patch="[{\"op\": \"replace\", \"path\": \"/etcdClientInfo/urls\", \"value\": [\"${API_SCHEME}://${API_HOST}:${ETCD_PORT}\"]}]" | \
167+
oc ex config patch - --patch="{\"etcdConfig\": {\"peerAddress\": \"${API_HOST}:${ETCD_PEER_PORT}\"}}" | \
168+
oc ex config patch - --patch="{\"etcdConfig\": {\"peerServingInfo\": {\"bindAddress\": \"${API_HOST}:${ETCD_PEER_PORT}\"}}}" | \
169+
oc ex config patch - --patch="{\"auditConfig\": {\"enabled\": true}}" | \
170+
oc ex config patch - --patch="{\"imagePolicyConfig\": {\"maxImagesBulkImportedPerRepository\": ${MAX_IMAGES_BULK_IMPORTED_PER_REPOSITORY:-5}}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
171171

172172
# Make oc use ${MASTER_CONFIG_DIR}/admin.kubeconfig, and ignore anything in the running user's $HOME dir
173173
export ADMIN_KUBECONFIG="${MASTER_CONFIG_DIR}/admin.kubeconfig"

pkg/oc/admin/diagnostics/diagnostics/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ logic. This provides two major benefits:
5252
Having configuration files where ansible places them means you will generally
5353
not even need to specify where to find them. Running:
5454

55-
openshift ex diagnostics
55+
oc ex diagnostics
5656

5757
by itself will look for master and node configs (in addition to client
5858
config file) in the standard locations and use them if found; so this
5959
should make the ansible-installed use case as simple as possible. It's also
6060
very easy to use configuration files when they are not in the expected
6161
Enterprise locations:
6262

63-
openshift ex diagnostics --master-config=... --node-config=...
63+
oc ex diagnostics --master-config=... --node-config=...
6464

6565
Having logs in journald is necessary for the current log analysis
6666
logic. Other usage may have logs going into files, output to stdout,

test/cmd/diagnostics.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ os::cmd::expect_failure_and_text 'oc adm diagnostics AnalyzeLogs AlsoMissing' 'N
4141
os::cmd::expect_success_and_text 'oc adm diagnostics MetricsApiProxy' 'Skipping diagnostic: MetricsApiProxy'
4242
os::cmd::expect_success_and_text 'oc adm diagnostics NetworkCheck --prevent-modification' 'Skipping diagnostic: NetworkCheck'
4343

44-
# openshift ex diagnostics is deprecated but not removed. Make sure it works until we consciously remove it.
45-
os::cmd::expect_success 'openshift ex diagnostics ClusterRoleBindings ClusterRoles ConfigContexts '
44+
# oc ex diagnostics is deprecated but not removed. Make sure it works until we consciously remove it.
45+
os::cmd::expect_success 'oc ex diagnostics ClusterRoleBindings ClusterRoles ConfigContexts '
4646
echo "diagnostics: ok"
4747
os::test::junit::declare_suite_end

test/cmd/help.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ os::test::junit::declare_suite_start "cmd/help"
77

88
# verify some default commands
99
os::cmd::expect_success 'openshift'
10-
os::cmd::expect_success 'openshift ex'
1110
os::cmd::expect_success 'kubectl'
1211
os::cmd::expect_success 'oc'
12+
os::cmd::expect_success 'oc ex'
1313
os::cmd::expect_success 'origin'
1414

1515
# help for root commands must be consistent
@@ -75,9 +75,9 @@ os::cmd::expect_failure_and_text 'oc login --certificate-authority=/path/to/inva
7575
os::cmd::expect_failure 'oc policy TYPO'
7676
os::cmd::expect_failure 'oc secrets TYPO'
7777

78-
# make sure that LDAP group sync and prune exist under both parents
79-
os::cmd::expect_success_and_text 'openshift ex sync-groups --help' 'external provider'
80-
os::cmd::expect_success_and_text 'openshift ex prune-groups --help' 'external provider'
78+
# make sure that LDAP group sync and prune exist under both experimental and `oc adm`
79+
os::cmd::expect_success_and_text 'oc ex sync-groups --help' 'external provider'
80+
os::cmd::expect_success_and_text 'oc ex prune-groups --help' 'external provider'
8181
os::cmd::expect_success_and_text 'oc adm groups sync --help' 'external provider'
8282
os::cmd::expect_success_and_text 'oc adm groups prune --help' 'external provider'
8383
os::cmd::expect_success_and_text 'oc adm prune groups --help' 'external provider'

test/extended/gssapi.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ backend='https://openshift.default.svc.cluster.local:443'
4545

4646
oauth_patch="$(sed "s/HOST_NAME/${host}/" "${test_data_location}/config/oauth_config.json")"
4747
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.tmp.yaml"
48-
openshift ex config patch "${SERVER_CONFIG_DIR}/master/master-config.tmp.yaml" --patch="${oauth_patch}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
48+
oc ex config patch "${SERVER_CONFIG_DIR}/master/master-config.tmp.yaml" --patch="${oauth_patch}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
4949
os::start::server
5050

5151
export KUBECONFIG="${ADMIN_KUBECONFIG}"

test/extended/setup.sh

+4-4
Original file line numberDiff line numberDiff line change
@@ -113,24 +113,24 @@ function os::test::extended::setup () {
113113
# put change there - only want this for extended tests
114114
os::log::info "Turn on audit logging"
115115
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml"
116-
openshift ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml" --patch="{\"auditConfig\": {\"enabled\": true, \"auditFilePath\": \"${LOG_DIR}/audit.log\"}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
116+
oc ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml" --patch="{\"auditConfig\": {\"enabled\": true, \"auditFilePath\": \"${LOG_DIR}/audit.log\"}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
117117

118118
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml"
119-
openshift ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml" --patch="{\"templateServiceBrokerConfig\": {\"templateNamespaces\": [\"openshift\"]}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
119+
oc ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig2.yaml" --patch="{\"templateServiceBrokerConfig\": {\"templateNamespaces\": [\"openshift\"]}}" > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
120120

121121
# If the XFS volume dir mount point exists enable local storage quota in node-config.yaml so these tests can pass:
122122
if [[ -n "${LOCAL_STORAGE_QUOTA}" ]]; then
123123
# The ec2 images usually have ~5Gi of space defined for the xfs vol for the registry; want to give /registry a good chunk of that
124124
# to store the images created when the extended tests run
125125
cp "${NODE_CONFIG_DIR}/node-config.yaml" "${NODE_CONFIG_DIR}/node-config.orig2.yaml"
126-
openshift ex config patch "${NODE_CONFIG_DIR}/node-config.orig2.yaml" --patch='{"volumeConfig":{"localQuota":{"perFSGroup":"4480Mi"}}}' > "${NODE_CONFIG_DIR}/node-config.yaml"
126+
oc ex config patch "${NODE_CONFIG_DIR}/node-config.orig2.yaml" --patch='{"volumeConfig":{"localQuota":{"perFSGroup":"4480Mi"}}}' > "${NODE_CONFIG_DIR}/node-config.yaml"
127127
fi
128128
os::log::info "Using VOLUME_DIR=${VOLUME_DIR}"
129129

130130
# This is a bit hacky, but set the pod gc threshold appropriately for the garbage_collector test
131131
# and enable-hostpath-provisioner for StatefulSet tests
132132
cp "${SERVER_CONFIG_DIR}/master/master-config.yaml" "${SERVER_CONFIG_DIR}/master/master-config.orig3.yaml"
133-
openshift ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig3.yaml" --patch='{"kubernetesMasterConfig":{"controllerArguments":{"terminated-pod-gc-threshold":["100"], "enable-hostpath-provisioner":["true"]}}}' > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
133+
oc ex config patch "${SERVER_CONFIG_DIR}/master/master-config.orig3.yaml" --patch='{"kubernetesMasterConfig":{"controllerArguments":{"terminated-pod-gc-threshold":["100"], "enable-hostpath-provisioner":["true"]}}}' > "${SERVER_CONFIG_DIR}/master/master-config.yaml"
134134

135135
os::start::server "${API_SERVER_VERSION:-}" "${CONTROLLER_VERSION:-}" "${SKIP_NODE:-}"
136136

tools/clicheck/check_cli_conventions.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ var (
1414
"openshift start kubernetes", // TODO enable when we upstream all these conventions
1515
"openshift cli create quota", // TODO has examples starting with '//', enable when we upstream all these conventions
1616
"openshift cli adm", // already checked in 'openshift admin'
17-
"openshift ex", // we will only care about experimental when they get promoted
17+
"openshift cli ex", // we will only care about experimental when they get promoted
1818
"openshift cli types",
1919
}
2020
)

0 commit comments

Comments
 (0)