Sanity tests improvements (#3439)

- Fix how inputs are passed for sanity tests
- Fix timestamp generated
- use go build instead of make when building corso

---

#### 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

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #<issue>

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
This commit is contained in:
Abin Simon 2023-05-17 22:12:14 +05:30 committed by GitHub
parent cd1d0ce582
commit eebab47052
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,7 @@ jobs:
with:
go-version-file: src/go.mod
- run: make build
- run: go build -o corso
- run: go build -o sanity-test ./cmd/sanity_test
- run: mkdir ${TEST_RESULT}
@ -79,17 +79,17 @@ jobs:
- name: Set purge boundary
if: always()
run: |
echo "NOW=$(date +"%Y-%m-%d_%H-%M-%S")" >> $GITHUB_ENV
echo "NOW=$(date +"%Y-%m-%dT%H:%M:%SZ")" >> $GITHUB_ENV
- name: Purge CI-Produced Folders for Users
uses: ./.github/actions/purge-m365-data
with:
user: ${TEST_USER}
folder-prefix: ${RESTORE_DEST_PFX}
user: ${{ env.TEST_USER }}
folder-prefix: ${{ env.RESTORE_DEST_PFX }}
older-than: ${{ env.NOW }}
azure-client-id: ${AZURE_CLIENT_ID}
azure-client-secret: ${AZURE_CLIENT_SECRET}
azure-tenant-id: ${AZURE_TENANT_ID}
azure-client-id: ${{ env.AZURE_CLIENT_ID }}
azure-client-secret: ${{ env.AZURE_CLIENT_SECRET }}
azure-tenant-id: ${{ env.AZURE_TENANT_ID }}
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}
@ -97,13 +97,13 @@ jobs:
if: always()
uses: ./.github/actions/purge-m365-data
with:
site: ${TEST_SITE}
folder-prefix: ${RESTORE_DEST_PFX}
site: ${{ env.TEST_SITE }}
folder-prefix: ${{ env.RESTORE_DEST_PFX }}
libraries: ${{ vars.CORSO_M365_TEST_SITE_LIBRARIES }}
older-than: ${{ env.NOW }}
azure-client-id: ${AZURE_CLIENT_ID}
azure-client-secret: ${AZURE_CLIENT_SECRET}
azure-tenant-id: ${AZURE_TENANT_ID}
azure-client-id: ${{ env.AZURE_CLIENT_ID }}
azure-client-secret: ${{ env.AZURE_CLIENT_SECRET }}
azure-tenant-id: ${{ env.AZURE_TENANT_ID }}
m365-admin-user: ${{ secrets.M365_TENANT_ADMIN_USER }}
m365-admin-password: ${{ secrets.M365_TENANT_ADMIN_PASSWORD }}