mirror of
https://github.com/projectatomic/atomic.git
synced 2026-02-05 18:45:01 +01:00
Fix test failures after updating papr to test with f26 atomic/cloud images instead of f25, with the following changes: 1. Remove dependency on docker hub tester image. Instead, mimic what ostree/rpm-ostree does and use a recursive .papr.sh script to install the necessary packages to the base f26 image in the fedora registry. This fixes tests on the atomic host since python3.6 is being used, and prevents future tests from testing the wrong version. (Note this is slightly slower due to having to install packages during the test rather than using a pre-built image). 2. Fix some pylint errors, and mask others for now 3. Fix failing integration tests due to inter-test interference 4. Remove unnecessary deepcopy in container filter 5. Add compatibility for both c-s-s and d-s-s in storage 6. Update expected sha256 values for dockertar test Remaining issues: 1. test_storage should possibly be reworked. The current test setup is conflicting with the new default of overlay as a driver. For now, the test for generated d-s-s is disabled. 2. some storage commands are still using "docker-storage-setup" instead of "container-storage-setup". There is a backward compatible check in place that should be reworked in the future 3. some masked pylint errors should be further investigated 4. keep the dockerfile for the project atomic tester image for now (bump to 26), since its a little easier and faster to set up with Signed-off-by: Yu Qi Zhang <jerzhang@redhat.com> Closes: #1076 Approved by: baude
61 lines
1.4 KiB
Bash
61 lines
1.4 KiB
Bash
#!/bin/bash
|
|
|
|
set -euo pipefail
|
|
_FINISH(){
|
|
RESULT=($?)
|
|
if [ ${RESULT} -eq 0 ]; then
|
|
echo ""
|
|
echo "Tests completed normally..."
|
|
vagrant destroy ${BOX}
|
|
echo ""
|
|
else
|
|
echo ""
|
|
echo "** Test failed. Leaving '${BOX}' running for debug." 2>&1 | tee -a ${tee_file}
|
|
echo "** Be sure to halt or destroy prior to re-running the check" 2>&1 | tee -a ${tee_file}
|
|
echo "** Logs are stored at ${tee_file}"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
# When make calls bash, the real signals are not surfaced
|
|
# correctly to trap. So we trap on EXIT and then sort it
|
|
# out in _FINISH
|
|
trap _FINISH EXIT
|
|
|
|
BOXES="fedora_atomic centos_atomic fedora_cloud"
|
|
|
|
is_running() {
|
|
status=$(vagrant status | grep ${BOX} | awk '{print $2}')
|
|
if [ ${status} == "running" ]; then
|
|
RUNNING=true
|
|
else
|
|
RUNNING=false
|
|
|
|
fi
|
|
}
|
|
|
|
|
|
if [[ ! $BOXES =~ $BOX ]]; then
|
|
echo ""
|
|
echo "Invalid BOX name: $BOX. Valid choices are $BOXES"
|
|
echo ""
|
|
exit 1
|
|
fi
|
|
|
|
echo "Testing on ${BOX}"
|
|
timestamp=$(date +%Y_%m_%d_%H_%M)
|
|
tee_file="${BOX}_${timestamp}.log"
|
|
is_running
|
|
|
|
if ${RUNNING}; then
|
|
echo ""
|
|
echo "*** '${BOX}' is already running. Re-syncing and rerunning test ..."
|
|
echo ""
|
|
vagrant rsync ${BOX}
|
|
else
|
|
vagrant up ${BOX} 2>&1 | tee ${tee_file}
|
|
fi
|
|
|
|
vagrant ssh ${BOX} -c "cd /home/vagrant/atomic && sudo sh ./.papr.sh" 2>&1 | tee -a ${tee_file}
|