More consistent folder cleanup for OneDrive test (#1663)
## Description Cleanup all folders instead of just some of them. Log errors instead of failing test ## Type of change - [ ] 🌻 Feature - [ ] 🐛 Bugfix - [ ] 🗺️ Documentation - [x] 🤖 Test - [ ] 💻 CI/Deployment - [x] 🐹 Trivial/Minor ## Issue(s) * closes #1661 ## Test Plan <!-- How will this be tested prior to merging.--> - [ ] 💪 Manual - [x] ⚡ Unit test - [ ] 💚 E2E
This commit is contained in:
parent
743c614ce4
commit
9963e50b99
@ -10,6 +10,7 @@ import (
|
||||
|
||||
"github.com/alcionai/corso/src/internal/common"
|
||||
"github.com/alcionai/corso/src/internal/tester"
|
||||
"github.com/alcionai/corso/src/pkg/logger"
|
||||
"github.com/alcionai/corso/src/pkg/selectors"
|
||||
)
|
||||
|
||||
@ -49,15 +50,20 @@ func (suite *OneDriveSuite) TestCreateGetDeleteFolder() {
|
||||
|
||||
driveID := *drives[0].GetId()
|
||||
|
||||
defer func() {
|
||||
for _, id := range folderIDs {
|
||||
err := DeleteItem(ctx, gs, driveID, id)
|
||||
if err != nil {
|
||||
logger.Ctx(ctx).Warnw("deleting folder", "id", id, "error", err)
|
||||
}
|
||||
}
|
||||
}()
|
||||
|
||||
folderID, err := createRestoreFolders(ctx, gs, driveID, folderElements)
|
||||
require.NoError(t, err)
|
||||
|
||||
folderIDs = append(folderIDs, folderID)
|
||||
|
||||
defer func() {
|
||||
assert.NoError(t, DeleteItem(ctx, gs, driveID, folderIDs[0]))
|
||||
}()
|
||||
|
||||
folderName2 := "Corso_Folder_Test_" + common.FormatNow(common.SimpleTimeTesting)
|
||||
folderElements = append(folderElements, folderName2)
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user