tests: add sudo to get_metadata function
With new weldr-client package the metadata tar archive created has permissions set to 600 instead of 644 which causes permission failures when interacting with it. Adding sudo to resolve that.
This commit is contained in:
parent
98abdf1902
commit
5eb8709a18
8 changed files with 24 additions and 24 deletions
|
|
@ -118,11 +118,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Get the console screenshot from the AWS instance.
|
||||
|
|
|
|||
|
|
@ -126,11 +126,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
is_weldr_client_installed () {
|
||||
|
|
|
|||
|
|
@ -150,11 +150,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
jq -M '.' "${TEMPDIR}"/"${COMPOSE_ID}".json | tee "$METADATA_FILE" > /dev/null
|
||||
sudo jq -M '.' "${TEMPDIR}"/"${COMPOSE_ID}".json | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Build an installer
|
||||
|
|
|
|||
|
|
@ -165,11 +165,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Build ostree image.
|
||||
|
|
|
|||
|
|
@ -137,11 +137,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Build ostree image.
|
||||
|
|
|
|||
|
|
@ -146,11 +146,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Build ostree image.
|
||||
|
|
|
|||
|
|
@ -163,11 +163,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL" -C "${TEMPDIR}"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${TEMPDIR}"/"${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Build ostree image.
|
||||
|
|
|
|||
|
|
@ -97,11 +97,11 @@ get_compose_metadata () {
|
|||
|
||||
# Find the tarball and extract it.
|
||||
TARBALL=$(basename "$(find . -maxdepth 1 -type f -name "*-metadata.tar")")
|
||||
tar -xf "$TARBALL"
|
||||
rm -f "$TARBALL"
|
||||
sudo tar -xf "$TARBALL"
|
||||
sudo rm -f "$TARBALL"
|
||||
|
||||
# Move the JSON file into place.
|
||||
cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
sudo cat "${COMPOSE_ID}".json | jq -M '.' | tee "$METADATA_FILE" > /dev/null
|
||||
}
|
||||
|
||||
# Write an VMWare TOML file
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue