- Added configuration options for Stalwart hosted mail in .env.example. - Updated Docker Compose to include Stalwart service with health checks. - Introduced new API endpoints for managing mail domains and migration projects. - Enhanced Authentik blueprints for user enrollment and post-migration security. - Updated OAuth handling for Google and Microsoft migration processes. - Improved error handling and response structures in the mail API. - Added integration tests for email claiming and migration workflows.
26 lines
616 B
Go
26 lines
616 B
Go
package migration
|
|
|
|
import "testing"
|
|
|
|
func TestConfigureImportBatch(t *testing.T) {
|
|
t.Cleanup(func() {
|
|
ConfigureImportBatch(ImportBatchConfig{
|
|
Mail: defaultMailImportBatchSize,
|
|
Drive: defaultDriveImportBatchSize,
|
|
})
|
|
})
|
|
|
|
ConfigureImportBatch(ImportBatchConfig{Mail: 7, Drive: 3})
|
|
if got := mailImportBatchSize(); got != 7 {
|
|
t.Fatalf("mail batch = %d", got)
|
|
}
|
|
if got := driveImportBatchSize(); got != 3 {
|
|
t.Fatalf("drive batch = %d", got)
|
|
}
|
|
|
|
ConfigureImportBatch(ImportBatchConfig{Mail: 0, Drive: 0})
|
|
if got := mailImportBatchSize(); got != 7 {
|
|
t.Fatalf("mail batch unchanged = %d", got)
|
|
}
|
|
}
|