Longevity test updates (#4159)

Update longevity test with newly released commands
and flags

Added features are:
* OneDrive and SharePoint backup
* repo init with retention settings

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
ashmrtn 2023-08-30 11:04:24 -07:00 committed by GitHub
parent 4c452bcd8e
commit 08ab7abb76
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -47,7 +47,7 @@ jobs:
run:
working-directory: src
##########################################################################################################################################
############################################################################
# setup
steps:
- uses: actions/checkout@v3
@ -89,8 +89,7 @@ jobs:
role-session-name: integration-testing
aws-region: us-east-1
##########################################################################################################################################
##########################################################################
# Repository commands
- name: Version Test
@ -105,6 +104,9 @@ jobs:
./corso repo init s3 \
--no-stats \
--hide-progress \
--retention-mode $(echo "${{ env.RETENTION_MODE }}" | tr '[:upper:]' '[:lower:]') \
--retention-duration "${{ env.RETENTION_DURATION }}h" \
--extend-retention \
--prefix ${{ env.PREFIX }} \
--bucket ${{ secrets.CI_RETENTION_TESTS_S3_BUCKET }} \
--succeed-if-exists \
@ -133,8 +135,7 @@ jobs:
exit 1
fi
##########################################################################################################################################
##########################################################################
# Exchange
- name: Backup exchange test
@ -158,7 +159,7 @@ jobs:
data=$( echo $resultjson | jq -r '.[0] | .id' )
echo result=$data >> $GITHUB_OUTPUT
##########################################################################################################################################
##########################################################################
# Onedrive
- name: Backup onedrive test
@ -183,8 +184,7 @@ jobs:
data=$( echo $resultjson | jq -r '.[0] | .id' )
echo result=$data >> $GITHUB_OUTPUT
##########################################################################################################################################
##########################################################################
# Sharepoint test
- name: Backup sharepoint test
id: sharepoint-test
@ -209,8 +209,7 @@ jobs:
data=$( echo $resultjson | jq -r '.[0] | .id' )
echo result=$data >> $GITHUB_OUTPUT
##########################################################################################################################################
##########################################################################
# Backup Exchange Deletion test
- name: Backup Delete exchange test
id: delete-exchange-test
@ -222,8 +221,7 @@ jobs:
echo -e "\nDelete Backup exchange \n" >> ${CORSO_LOG_FILE}
./longevity-test
##########################################################################################################################################
##########################################################################
# Backup Onedrive Deletion test
- name: Backup Delete onedrive test
id: delete-onedrive-test
@ -235,8 +233,7 @@ jobs:
echo -e "\nDelete Backup onedrive \n" >> ${CORSO_LOG_FILE}
./longevity-test
##########################################################################################################################################
##########################################################################
# Backup Sharepoint Deletion test
- name: Backup Delete Sharepoint test
id: delete-sharepoint-test
@ -248,66 +245,61 @@ jobs:
echo -e "\nDelete Backup sharepoint \n" >> ${CORSO_LOG_FILE}
./longevity-test
##########################################################################################################################################
# skipped until supported
##########################################################################
# Export OneDrive Test
# - name: OneDrive Export test
# run: |
# set -euo pipefail
# echo -e "\Export OneDrive test\n" >> ${CORSO_LOG_FILE}
- name: OneDrive Export test
run: |
set -euo pipefail
echo -e "\Export OneDrive test\n" >> ${CORSO_LOG_FILE}
# echo -e "\Export OneDrive test - first entry\n" >> ${CORSO_LOG_FILE}
# ./corso backup list onedrive 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
# while read -r line; do
# ./corso export onedrive \
# "/tmp/corso-export--$line" \
# --no-stats \
# --backup "$line" \
# 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_onedrive_first.txt
# done
echo -e "\Export OneDrive test - first entry\n" >> ${CORSO_LOG_FILE}
./corso backup list onedrive 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
while read -r line; do
./corso export onedrive \
"/tmp/corso-export--$line" \
--no-stats \
--backup "$line" \
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_onedrive_first.txt
done
# echo -e "\Export OneDrive test - last entry\n" >> ${CORSO_LOG_FILE}
# ./corso backup list onedrive 2>/dev/null | tail -n1 | awk '{print $1}' |
# while read -r line; do
# ./corso export onedrive \
# "/tmp/corso-export--$line" \
# --no-stats \
# --backup "$line" \
# 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_onedrive_last.txt
# done
echo -e "\Export OneDrive test - last entry\n" >> ${CORSO_LOG_FILE}
./corso backup list onedrive 2>/dev/null | tail -n1 | awk '{print $1}' |
while read -r line; do
./corso export onedrive \
"/tmp/corso-export--$line" \
--no-stats \
--backup "$line" \
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_onedrive_last.txt
done
##########################################################################################################################################
# skipped until supported
##########################################################################
# Export SharePoint Test
# - name: SharePoint Export test
# run: |
# set -euo pipefail
# echo -e "\Export SharePoint test\n" >> ${CORSO_LOG_FILE}
- name: SharePoint Export test
run: |
set -euo pipefail
echo -e "\Export SharePoint test\n" >> ${CORSO_LOG_FILE}
# echo -e "\Export SharePoint test - first entry\n" >> ${CORSO_LOG_FILE}
# ./corso backup list sharepoint 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
# while read -r line; do
# ./corso export sharepoint \
# "/tmp/corso-export--$line" \
# --no-stats \
# --backup "$line" \
# 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_sharepoint_first.txt
# done
echo -e "\Export SharePoint test - first entry\n" >> ${CORSO_LOG_FILE}
./corso backup list sharepoint 2>/dev/null | tail -n+2 | head -n1 | awk '{print $1}' |
while read -r line; do
./corso export sharepoint \
"/tmp/corso-export--$line" \
--no-stats \
--backup "$line" \
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_sharepoint_first.txt
done
# echo -e "\Export SharePoint test - last entry\n" >> ${CORSO_LOG_FILE}
# ./corso backup list sharepoint 2>/dev/null | tail -n1 | awk '{print $1}' |
# while read -r line; do
# ./corso export sharepoint \
# "/tmp/corso-export--$line" \
# --no-stats \
# --backup "$line" \
# 2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_sharepoint_last.txt
# done
##########################################################################################################################################
echo -e "\Export SharePoint test - last entry\n" >> ${CORSO_LOG_FILE}
./corso backup list sharepoint 2>/dev/null | tail -n1 | awk '{print $1}' |
while read -r line; do
./corso export sharepoint \
"/tmp/corso-export--$line" \
--no-stats \
--backup "$line" \
2>&1 | tee ${{ env.CORSO_LOG_DIR }}/export_sharepoint_last.txt
done
##########################################################################
# Maintenance test
- name: Maintenance test Daily
id: maintenance-test-daily
@ -370,10 +362,8 @@ jobs:
--prefix "x"
fi
##########################################################################################################################################
##########################################################################
# Logging & Notifications
# Upload the original go test output as an artifact for later review.
- name: Upload test log
if: always()