fixes failing nightly tests due to PR#5060 changes (#5176)

Fixes tests failing due to change in PR #5060 

#### 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)
- https://github.com/alcionai/corso/actions/runs/7736081427
- https://github.com/alcionai/corso/actions/runs/7751227007

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [x]  Unit test
- [x] 💚 E2E
This commit is contained in:
Hitesh Pattanayak 2024-02-02 13:27:53 +05:30 committed by GitHub
parent d983488154
commit 29f6582bc7
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 5 additions and 7 deletions

View File

@ -5,7 +5,6 @@ import (
"testing"
"github.com/alcionai/clues"
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
@ -82,9 +81,9 @@ func (suite *FilesystemE2ESuite) TestInitFilesystemCmd() {
err = cmd.ExecuteContext(ctx)
require.NoError(t, err, clues.ToCore(err))
// a second initialization should result in an error
// noop
err = cmd.ExecuteContext(ctx)
assert.ErrorIs(t, err, repository.ErrorRepoAlreadyExists, clues.ToCore(err))
require.NoError(t, err, clues.ToCore(err))
})
}
}

View File

@ -89,9 +89,9 @@ func (suite *S3E2ESuite) TestInitS3Cmd() {
err = cmd.ExecuteContext(ctx)
require.NoError(t, err, clues.ToCore(err))
// a second initialization should result in an error
// noop
err = cmd.ExecuteContext(ctx)
assert.ErrorIs(t, err, repository.ErrorRepoAlreadyExists, clues.ToCore(err))
require.NoError(t, err, clues.ToCore(err))
})
}
}
@ -116,8 +116,7 @@ func (suite *S3E2ESuite) TestInitMultipleTimes() {
"repo", "init", "s3",
"--"+flags.ConfigFileFN, configFP,
"--bucket", cfg.Bucket,
"--prefix", cfg.Prefix,
"--succeed-if-exists")
"--prefix", cfg.Prefix)
cli.BuildCommandTree(cmd)
// run the command