Skip to content

Commit

Permalink
[tempest] Remove unnecessary sudo calls
Browse files Browse the repository at this point in the history
  • Loading branch information
lpiwowar committed Aug 30, 2024
1 parent a7ffdf8 commit e551777
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions container-images/tcib/base/os/tempest/run_tempest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ function upload_extra_images {
image_create_params=()

[[ ! -f "${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" ]] && \
sudo curl -o "${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" "${TEMPEST_EXTRA_IMAGES_URL[image_index]}"
curl -o "${HOMEDIR}/${TEMPEST_EXTRA_IMAGES_NAME[image_index]}" "${TEMPEST_EXTRA_IMAGES_URL[image_index]}"

[[ ${TEMPEST_EXTRA_IMAGES_DISK_FORMAT[image_index]} != "-" ]] && \
image_create_params+=(--disk-format ${TEMPEST_EXTRA_IMAGES_DISK_FORMAT[image_index]})
Expand All @@ -240,7 +240,7 @@ function upload_extra_images {
image_create_params+=(--id ${TEMPEST_EXTRA_IMAGES_ID[image_index]})

[[ ${TEMPEST_EXTRA_IMAGES_NAME[image_index]} != "-" ]] && \
image_create_params+=(--file ${TEMPEST_EXTRA_IMAGES_NAME[image_index]})
image_create_params+=(--file "${HOMEDIR}/${TEMPEST_EXTRA_IMAGES_NAME[image_index]}")

[[ ${TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT[image_index]} != "-" ]] && \
image_create_params+=(--container-format ${TEMPEST_EXTRA_IMAGES_CONTAINER_FORMAT[image_index]})
Expand Down Expand Up @@ -406,9 +406,9 @@ fi
if [ -f ${HOMEDIR}/id_ecdsa ]; then
mkdir -p ${HOMEDIR}/.ssh
cp ${HOMEDIR}/id_ecdsa ${HOMEDIR}/.ssh/id_ecdsa
sudo chmod 700 ${HOMEDIR}/.ssh
sudo chmod 600 ${HOMEDIR}/.ssh/id_ecdsa
sudo chown -R tempest:tempest ${HOMEDIR}/.ssh
chmod 700 ${HOMEDIR}/.ssh
chmod 600 ${HOMEDIR}/.ssh/id_ecdsa
chown -R tempest:tempest ${HOMEDIR}/.ssh
fi

if [ -z $TEMPEST_EXTERNAL_PLUGIN_GIT_URL ]; then
Expand Down
2 changes: 1 addition & 1 deletion container-images/tcib/base/os/tempest/tempest_sudoers
Original file line number Diff line number Diff line change
@@ -1 +1 @@
tempest ALL=(ALL) NOPASSWD: ALL
tempest ALL=(ALL) NOPASSWD: /usr/bin/dnf

0 comments on commit e551777

Please sign in to comment.