use replace collisions for nightly tests (#3882)
#### Does this PR need a docs update or release note? - [x] ⛔ No #### Type of change - [x] 🤖 Supportability/Tests #### Issue(s) * #3562 #### Test Plan - [x] ⚡ Unit test - [x] 💚 E2E
This commit is contained in:
parent
4ddbb1cc30
commit
7677299ace
@ -24,6 +24,10 @@ inputs:
|
||||
log-dir:
|
||||
description: Folder to store test log files
|
||||
required: true
|
||||
on-collision:
|
||||
description: Value for the --collisions flag
|
||||
requried: false
|
||||
default: "replace"
|
||||
|
||||
outputs:
|
||||
backup-id:
|
||||
@ -57,6 +61,7 @@ runs:
|
||||
./corso restore '${{ inputs.service }}' \
|
||||
--no-stats \
|
||||
--hide-progress \
|
||||
--collisions ${{ inputs.on-collision }} \
|
||||
${{ inputs.restore-args }} \
|
||||
--backup '${{ steps.backup.outputs.result }}' \
|
||||
2>&1 |
|
||||
|
||||
@ -692,6 +692,7 @@ func runRestoreBackupTestVersions(
|
||||
tenant string,
|
||||
resourceOwners []string,
|
||||
opts control.Options,
|
||||
crc control.RestoreConfig,
|
||||
) {
|
||||
ctx, flush := tester.NewContext(t)
|
||||
defer flush()
|
||||
@ -702,7 +703,7 @@ func runRestoreBackupTestVersions(
|
||||
Service: test.service,
|
||||
Tenant: tenant,
|
||||
ResourceOwners: resourceOwners,
|
||||
RestoreCfg: testdata.DefaultRestoreConfig(""),
|
||||
RestoreCfg: crc,
|
||||
}
|
||||
|
||||
totalItems, _, collections, _, err := stub.GetCollectionsAndExpected(
|
||||
|
||||
@ -22,6 +22,7 @@ import (
|
||||
"github.com/alcionai/corso/src/internal/tester/tconfig"
|
||||
"github.com/alcionai/corso/src/internal/version"
|
||||
"github.com/alcionai/corso/src/pkg/control"
|
||||
"github.com/alcionai/corso/src/pkg/control/testdata"
|
||||
"github.com/alcionai/corso/src/pkg/path"
|
||||
"github.com/alcionai/corso/src/pkg/services/m365/api"
|
||||
)
|
||||
@ -516,6 +517,9 @@ func testRestoreAndBackupMultipleFilesAndFoldersNoPermissions(
|
||||
collectionsLatest: expected,
|
||||
}
|
||||
|
||||
rc := testdata.DefaultRestoreConfig("od_restore_and_backup_multi")
|
||||
rc.OnCollision = control.Replace
|
||||
|
||||
runRestoreBackupTestVersions(
|
||||
t,
|
||||
testData,
|
||||
@ -524,7 +528,8 @@ func testRestoreAndBackupMultipleFilesAndFoldersNoPermissions(
|
||||
control.Options{
|
||||
RestorePermissions: true,
|
||||
ToggleFeatures: control.Toggles{},
|
||||
})
|
||||
},
|
||||
rc)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -763,6 +768,9 @@ func testPermissionsRestoreAndBackup(suite oneDriveSuite, startVersion int) {
|
||||
collectionsLatest: expected,
|
||||
}
|
||||
|
||||
rc := testdata.DefaultRestoreConfig("perms_restore_and_backup")
|
||||
rc.OnCollision = control.Replace
|
||||
|
||||
runRestoreBackupTestVersions(
|
||||
t,
|
||||
testData,
|
||||
@ -771,7 +779,8 @@ func testPermissionsRestoreAndBackup(suite oneDriveSuite, startVersion int) {
|
||||
control.Options{
|
||||
RestorePermissions: true,
|
||||
ToggleFeatures: control.Toggles{},
|
||||
})
|
||||
},
|
||||
rc)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -851,6 +860,9 @@ func testPermissionsBackupAndNoRestore(suite oneDriveSuite, startVersion int) {
|
||||
collectionsLatest: expected,
|
||||
}
|
||||
|
||||
rc := testdata.DefaultRestoreConfig("perms_backup_no_restore")
|
||||
rc.OnCollision = control.Replace
|
||||
|
||||
runRestoreBackupTestVersions(
|
||||
t,
|
||||
testData,
|
||||
@ -859,7 +871,8 @@ func testPermissionsBackupAndNoRestore(suite oneDriveSuite, startVersion int) {
|
||||
control.Options{
|
||||
RestorePermissions: false,
|
||||
ToggleFeatures: control.Toggles{},
|
||||
})
|
||||
},
|
||||
rc)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1054,6 +1067,9 @@ func testPermissionsInheritanceRestoreAndBackup(suite oneDriveSuite, startVersio
|
||||
collectionsLatest: expected,
|
||||
}
|
||||
|
||||
rc := testdata.DefaultRestoreConfig("perms_inherit_restore_and_backup")
|
||||
rc.OnCollision = control.Replace
|
||||
|
||||
runRestoreBackupTestVersions(
|
||||
t,
|
||||
testData,
|
||||
@ -1062,7 +1078,8 @@ func testPermissionsInheritanceRestoreAndBackup(suite oneDriveSuite, startVersio
|
||||
control.Options{
|
||||
RestorePermissions: true,
|
||||
ToggleFeatures: control.Toggles{},
|
||||
})
|
||||
},
|
||||
rc)
|
||||
})
|
||||
}
|
||||
}
|
||||
@ -1247,6 +1264,9 @@ func testLinkSharesInheritanceRestoreAndBackup(suite oneDriveSuite, startVersion
|
||||
collectionsLatest: expected,
|
||||
}
|
||||
|
||||
rc := testdata.DefaultRestoreConfig("linkshares_inherit_restore_and_backup")
|
||||
rc.OnCollision = control.Replace
|
||||
|
||||
runRestoreBackupTestVersions(
|
||||
t,
|
||||
testData,
|
||||
@ -1255,7 +1275,8 @@ func testLinkSharesInheritanceRestoreAndBackup(suite oneDriveSuite, startVersion
|
||||
control.Options{
|
||||
RestorePermissions: true,
|
||||
ToggleFeatures: control.Toggles{},
|
||||
})
|
||||
},
|
||||
rc)
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user