update sanity test log files (#3486)
#### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🐛 Bugfix - [x] 💻 CI/Deployment #### Test Plan - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
7aaabcefdf
commit
b9344fc066
10
.github/actions/backup-restore-test/action.yml
vendored
10
.github/actions/backup-restore-test/action.yml
vendored
@ -21,6 +21,9 @@ inputs:
|
|||||||
base-backup:
|
base-backup:
|
||||||
description: Base backup to use for testing
|
description: Base backup to use for testing
|
||||||
required: false
|
required: false
|
||||||
|
log-dir:
|
||||||
|
description: Folder to store test log files
|
||||||
|
required: true
|
||||||
|
|
||||||
outputs:
|
outputs:
|
||||||
backup-id:
|
backup-id:
|
||||||
@ -35,6 +38,7 @@ runs:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-backup-${{ inputs.service }}-${{inputs.kind }}.log
|
||||||
./corso backup create '${{ inputs.service }}' \
|
./corso backup create '${{ inputs.service }}' \
|
||||||
--no-stats --hide-progress --json \
|
--no-stats --hide-progress --json \
|
||||||
${{ inputs.backup-args }} |
|
${{ inputs.backup-args }} |
|
||||||
@ -49,6 +53,7 @@ runs:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-restore-${{ inputs.service }}-${{inputs.kind }}.log
|
||||||
./corso restore '${{ inputs.service }}' \
|
./corso restore '${{ inputs.service }}' \
|
||||||
--no-stats \
|
--no-stats \
|
||||||
--hide-progress \
|
--hide-progress \
|
||||||
@ -71,6 +76,7 @@ runs:
|
|||||||
TEST_DATA: ${{ inputs.test-folder }}
|
TEST_DATA: ${{ inputs.test-folder }}
|
||||||
BASE_BACKUP: ${{ inputs.base-backup }}
|
BASE_BACKUP: ${{ inputs.base-backup }}
|
||||||
run: |
|
run: |
|
||||||
|
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-validate-${{ inputs.service }}-${{inputs.kind }}.log
|
||||||
./sanity-test
|
./sanity-test
|
||||||
|
|
||||||
- name: List ${{ inputs.service }} ${{ inputs.kind }}
|
- name: List ${{ inputs.service }} ${{ inputs.kind }}
|
||||||
@ -78,6 +84,7 @@ runs:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-backup-list-${{ inputs.service }}-${{inputs.kind }}.log
|
||||||
./corso backup list ${{ inputs.service }} \
|
./corso backup list ${{ inputs.service }} \
|
||||||
--no-stats \
|
--no-stats \
|
||||||
--hide-progress \
|
--hide-progress \
|
||||||
@ -95,6 +102,7 @@ runs:
|
|||||||
working-directory: src
|
working-directory: src
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
|
CORSO_LOG_FILE=${{ inputs.log-dir }}/gotest-backup-list-single-${{ inputs.service }}-${{inputs.kind }}.log
|
||||||
./corso backup list ${{ inputs.service }} \
|
./corso backup list ${{ inputs.service }} \
|
||||||
--no-stats \
|
--no-stats \
|
||||||
--hide-progress \
|
--hide-progress \
|
||||||
@ -114,6 +122,6 @@ runs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: "${{ inputs.service }}-${{ inputs.kind }}-logs"
|
name: "${{ inputs.service }}-${{ inputs.kind }}-logs"
|
||||||
path: ${{ env.WORKING_DIR }}/${{ env.CORSO_LOG_DIR }}/
|
path: ${{ inputs.log-dir }}/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
43
.github/workflows/sanity-test.yaml
vendored
43
.github/workflows/sanity-test.yaml
vendored
@ -35,23 +35,20 @@ jobs:
|
|||||||
AZURE_TENANT_ID: ${{ secrets.TENANT_ID }}
|
AZURE_TENANT_ID: ${{ secrets.TENANT_ID }}
|
||||||
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
CORSO_PASSPHRASE: ${{ secrets.INTEGRATION_TEST_CORSO_PASSPHRASE }}
|
||||||
# re-used values
|
# re-used values
|
||||||
# don't forget: return to Corso_Test_Sanity_
|
CORSO_LOG_DIR: ${{ github.workspace }}/src/testlog
|
||||||
CORSO_LOG_DIR: testlog
|
|
||||||
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log
|
CORSO_LOG_FILE: ${{ github.workspace }}/src/testlog/run-sanity.log
|
||||||
RESTORE_DEST_PFX: Corso_Test_Sanity_
|
RESTORE_DEST_PFX: Corso_Test_Sanity_
|
||||||
TEST_RESULT: test_results
|
TEST_RESULT: test_results
|
||||||
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }}
|
TEST_USER: ${{ github.event.inputs.user != '' && github.event.inputs.user || secrets.CORSO_M365_TEST_USER_ID }}
|
||||||
# The default working directory doesn't seem to apply to things without
|
|
||||||
# the 'run' directive. https://stackoverflow.com/a/67845456
|
|
||||||
WORKING_DIR: src
|
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
working-directory: ${{ env.WORKING_DIR }}
|
working-directory: src
|
||||||
steps:
|
|
||||||
##########################################################################################################################################
|
##########################################################################################################################################
|
||||||
|
|
||||||
# setup
|
# setup
|
||||||
|
steps:
|
||||||
|
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
@ -117,8 +114,6 @@ jobs:
|
|||||||
|
|
||||||
- name: Repo init test
|
- name: Repo init test
|
||||||
id: repo-init
|
id: repo-init
|
||||||
env:
|
|
||||||
TEST_RESULT: "test_results"
|
|
||||||
run: |
|
run: |
|
||||||
set -euo pipefail
|
set -euo pipefail
|
||||||
prefix=$(date +"%Y-%m-%d-%T")
|
prefix=$(date +"%Y-%m-%d-%T")
|
||||||
@ -128,9 +123,9 @@ jobs:
|
|||||||
--hide-progress \
|
--hide-progress \
|
||||||
--prefix $prefix \
|
--prefix $prefix \
|
||||||
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
||||||
2>&1 | tee $TEST_RESULT/initrepo.txt
|
2>&1 | tee ./testlogs/gotest-repo-init.log
|
||||||
|
|
||||||
if ! grep -q 'Initialized a S3 repository within bucket' $TEST_RESULT/initrepo.txt
|
if ! grep -q 'Initialized a S3 repository within bucket' ./$TEST_RESULT/gotest-repo-init.log
|
||||||
then
|
then
|
||||||
echo "Repo could not be initialized"
|
echo "Repo could not be initialized"
|
||||||
exit 1
|
exit 1
|
||||||
@ -147,9 +142,9 @@ jobs:
|
|||||||
--hide-progress \
|
--hide-progress \
|
||||||
--prefix ${{ steps.repo-init.outputs.result }} \
|
--prefix ${{ steps.repo-init.outputs.result }} \
|
||||||
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
--bucket ${{ secrets.CI_TESTS_S3_BUCKET }} \
|
||||||
2>&1 | tee $TEST_RESULT/connect.txt
|
2>&1 | tee ./testlogs/gotest-repo-connect.log
|
||||||
|
|
||||||
if ! grep -q 'Connected to S3 bucket' $TEST_RESULT/connect.txt
|
if ! grep -q 'Connected to S3 bucket' ./testlogs/gotest-repo-connect.log
|
||||||
then
|
then
|
||||||
echo "Repo could not be connected"
|
echo "Repo could not be connected"
|
||||||
exit 1
|
exit 1
|
||||||
@ -175,43 +170,47 @@ jobs:
|
|||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: exchange
|
service: exchange
|
||||||
kind: backup
|
kind: initial
|
||||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
- name: Exchange - Incremental backup
|
- name: Exchange - Incremental backup
|
||||||
id: exchange-backup-incremental
|
id: exchange-backup-incremental
|
||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: exchange
|
service: exchange
|
||||||
kind: backup-incremental
|
kind: incremental
|
||||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
- name: Exchange - Non delta backup
|
- name: Exchange - Non delta backup
|
||||||
id: exchange-backup-non-delta
|
id: exchange-backup-non-delta
|
||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: exchange
|
service: exchange
|
||||||
kind: backup-non-delta
|
kind: non-delta
|
||||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email" --disable-delta'
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email" --disable-delta'
|
||||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
- name: Exchange - Incremental backup after non-delta
|
- name: Exchange - Incremental backup after non-delta
|
||||||
id: exchange-backup-incremental-after-non-delta
|
id: exchange-backup-incremental-after-non-delta
|
||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: exchange
|
service: exchange
|
||||||
kind: backup-incremental-after-non-delta
|
kind: non-delta-incremental
|
||||||
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
backup-args: '--mailbox "${{ env.TEST_USER }}" --data "email"'
|
||||||
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
restore-args: '--email-folder ${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.repo-init.outputs.result }}'
|
||||||
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
base-backup: ${{ steps.exchange-backup.outputs.backup-id }}
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
|
|
||||||
##########################################################################################################################################
|
##########################################################################################################################################
|
||||||
@ -239,10 +238,11 @@ jobs:
|
|||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: onedrive
|
service: onedrive
|
||||||
kind: backup
|
kind: initial
|
||||||
backup-args: '--user "${{ env.TEST_USER }}"'
|
backup-args: '--user "${{ env.TEST_USER }}"'
|
||||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
# generate some more enteries for incremental check
|
# generate some more enteries for incremental check
|
||||||
- name: OneDrive - Create new data (for incremental)
|
- name: OneDrive - Create new data (for incremental)
|
||||||
@ -264,6 +264,7 @@ jobs:
|
|||||||
backup-args: '--user "${{ env.TEST_USER }}"'
|
backup-args: '--user "${{ env.TEST_USER }}"'
|
||||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }} --restore-permissions'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-onedrive.outputs.result }}'
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
##########################################################################################################################################
|
##########################################################################################################################################
|
||||||
|
|
||||||
@ -291,10 +292,11 @@ jobs:
|
|||||||
uses: ./.github/actions/backup-restore-test
|
uses: ./.github/actions/backup-restore-test
|
||||||
with:
|
with:
|
||||||
service: sharepoint
|
service: sharepoint
|
||||||
kind: backup
|
kind: initial
|
||||||
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
||||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
# generate some more enteries for incremental check
|
# generate some more enteries for incremental check
|
||||||
- name: SharePoint - Create new data (for incremental)
|
- name: SharePoint - Create new data (for incremental)
|
||||||
@ -317,6 +319,7 @@ jobs:
|
|||||||
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
backup-args: '--site "${{ secrets.CORSO_M365_TEST_SITE_URL }}"'
|
||||||
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
restore-args: '--folder ${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }} --restore-permissions'
|
||||||
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
test-folder: '${{ env.RESTORE_DEST_PFX }}${{ steps.new-data-creation-sharepoint.outputs.result }}'
|
||||||
|
log-dir: ${{ env.CORSO_LOG_DIR }}
|
||||||
|
|
||||||
##########################################################################################################################################
|
##########################################################################################################################################
|
||||||
|
|
||||||
@ -328,7 +331,7 @@ jobs:
|
|||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: sanity-test-log
|
name: sanity-test-log
|
||||||
path: ${{ github.workspace }}/${{ env.CORSO_LOG_DIR }}/
|
path: ${{ env.CORSO_LOG_DIR }}/*
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 14
|
retention-days: 14
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user