Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added exception list for config.yml checksums in GHA tests #2458

Closed
wants to merge 3 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
18 changes: 16 additions & 2 deletions .github/actions/upgrade-indexer/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@ declare -A files_new
PACKAGE_NAME="${1}"
MAJOR_MINOR_RELEASE=$((${2}))

# This list indicates the SHA values changes between versions
CONFIG_YML_EXCEPTIONS=("config.yml" "25c499973687a8fd3eb8b9ceb3da7a68")

# Check the system to differ between DEB and RPM
function check_system() {

Expand Down Expand Up @@ -46,11 +49,22 @@ function compare_arrays() {
echo "Comparing $file file checksum..."
echo "Old: ${files_old[$file]}"
echo "New: ${files_new[$file]}"
expected=false
for sha in "${!CONFIG_YML_EXCEPTIONS[@]}"; do
if [[ "${file}" == "${CONFIG_YML_EXCEPTIONS[0]}" && "${files_new[$file]}" == "${CONFIG_YML_EXCEPTIONS[$sha]}" ]]; then
expected=true
break
fi
done
if [[ "${files_old[$file]}" == "${files_new[$file]}" ]]; then
echo "${file} - Same checksum."
else
echo "${file} - Different checksum."
exit 1
if [[ $expected ]]; then
echo "${file} - Expected change."
else
echo "${file} - Different checksum."
exit 1
fi
fi
done

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/upgrade-indexer/upgrade-indexer.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ print_files "files_new"

compare_arrays
if [ "$?" -eq 0 ]; then
echo "Same checksums - Test passed correctly."
echo "Same or accepted checksums - Test passed correctly."
exit 0
fi
echo "Error: different checksums detected."
Expand Down
Loading