test/cases/oci: improve CI output

Avoid error message where this is no error.
This commit is contained in:
Florian Schüller 2025-06-04 15:52:55 +02:00 committed by Florian Schüller
parent 1d45104575
commit f0d39d986f
2 changed files with 4 additions and 2 deletions

View file

@ -38,7 +38,7 @@ region=${OCI_REGION}
EOF EOF
function installClient() { function installClient() {
if ! hash oci; then if ! hash oci 2>/dev/null; then
echo "Using 'oci' from a container" echo "Using 'oci' from a container"
sudo "${CONTAINER_RUNTIME}" pull "${CONTAINER_IMAGE_CLOUD_TOOLS}" sudo "${CONTAINER_RUNTIME}" pull "${CONTAINER_IMAGE_CLOUD_TOOLS}"

View file

@ -85,7 +85,7 @@ tenancy=${OCI_TENANCY}
region=${OCI_REGION} region=${OCI_REGION}
EOF EOF
if ! hash oci; then if ! hash oci 2>/dev/null; then
echo "Using 'oci' from a container" echo "Using 'oci' from a container"
sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS} sudo "${CONTAINER_RUNTIME}" pull ${CONTAINER_IMAGE_CLOUD_TOOLS}
@ -101,6 +101,8 @@ else
echo "Using pre-installed 'oci' from the system" echo "Using pre-installed 'oci' from the system"
OCI_CMD="oci --config-file $OCI_CONFIG --region $OCI_REGION" OCI_CMD="oci --config-file $OCI_CONFIG --region $OCI_REGION"
fi fi
echo -n "OCI version: "
$OCI_CMD --version $OCI_CMD --version
$OCI_CMD setup repair-file-permissions --file "${TEMPDIR}/priv_key.pem" $OCI_CMD setup repair-file-permissions --file "${TEMPDIR}/priv_key.pem"
$OCI_CMD setup repair-file-permissions --file "$OCI_CONFIG" $OCI_CMD setup repair-file-permissions --file "$OCI_CONFIG"