Fix nightly tests (#3532)

Few more assertion changes due to print out log path.<!-- PR description-->

Successful run: https://github.com/alcionai/corso/actions/runs/5110627324

---

#### 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
- [x] 🤖 Supportability/Tests
- [ ] 💻 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
- [x] 💚 E2E
This commit is contained in:
Abin Simon 2023-05-29 16:07:30 +05:30 committed by GitHub
parent 1eb730a930
commit 631dc477c6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 12 additions and 37 deletions

View File

@ -43,39 +43,6 @@ jobs:
SetM365App:
uses: alcionai/corso/.github/workflows/accSelector.yaml@main
SetEnv:
environment: Testing
runs-on: ubuntu-latest
outputs:
environment: ${{ steps.environment.outputs.environment }}
version: ${{ steps.version.outputs.version }}
website-bucket: ${{ steps.website-bucket.outputs.website-bucket }}
steps:
- uses: actions/checkout@v3
- name: Figure out environment
id: environment
run: |
echo "environment=Testing" | tee -a $GITHUB_OUTPUT
- name: Get version string
id: version
run: |
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
echo "version=$(git describe --exact-match --tags $(git rev-parse HEAD))" | tee -a $GITHUB_OUTPUT
else
echo "version=$(echo unreleased-$(git rev-parse --short HEAD))" | tee -a $GITHUB_OUTPUT
fi
- name: Get bucket name for website
id: website-bucket
run: |
if ${{ startsWith(github.ref, 'refs/tags/') }}; then
echo "website-bucket=corsobackup.io" | tee -a $GITHUB_OUTPUT
else
echo "website-bucket=test-corso-docs" | tee -a $GITHUB_OUTPUT
fi
# ----------------------------------------------------------------------------------------------------
# --- Nightly Testing -------------------------------------------------------------------
# ----------------------------------------------------------------------------------------------------

View File

@ -211,8 +211,12 @@ func (suite *BackupDeleteOneDriveE2ESuite) TestOneDriveBackupDeleteCmd() {
require.NoError(t, err, clues.ToCore(err))
result := suite.recorder.String()
assert.Equal(t, fmt.Sprintf("Deleted OneDrive backup %s\n", string(suite.backupOp.Results.BackupID)), result)
assert.True(t,
strings.HasSuffix(
result,
fmt.Sprintf("Deleted OneDrive backup %s\n", string(suite.backupOp.Results.BackupID)),
),
)
// a follow-up details call should fail, due to the backup ID being deleted
cmd = tester.StubRootCmd(

View File

@ -175,8 +175,12 @@ func (suite *BackupDeleteSharePointE2ESuite) TestSharePointBackupDeleteCmd() {
require.NoError(t, err, clues.ToCore(err))
result := suite.recorder.String()
expect := fmt.Sprintf("Deleted SharePoint backup %s\n", string(suite.backupOp.Results.BackupID))
assert.Equal(t, expect, result)
assert.True(t,
strings.HasSuffix(
result,
fmt.Sprintf("Deleted SharePoint backup %s\n", string(suite.backupOp.Results.BackupID)),
),
)
}
// moved out of the func above to make the linter happy