Chore: Add unit test for cloudmigration package (#88868)

This commit is contained in:
lean.dev
2024-06-07 13:46:19 -03:00
committed by GitHub
parent 3a8b59f5e8
commit 330da7916d
6 changed files with 952 additions and 53 deletions
@@ -411,7 +411,7 @@ func (s *Service) RunMigration(ctx context.Context, uid string) (*cloudmigration
}
// save the result of the migration
runUID, err := s.CreateMigrationRun(ctx, cloudmigration.CloudMigrationRun{
runUID, err := s.createMigrationRun(ctx, cloudmigration.CloudMigrationRun{
CloudMigrationUID: migration.UID,
Result: respData,
})
@@ -547,7 +547,7 @@ func (s *Service) getDashboards(ctx context.Context) ([]dashboards.Dashboard, er
return result, nil
}
func (s *Service) CreateMigrationRun(ctx context.Context, cmr cloudmigration.CloudMigrationRun) (string, error) {
func (s *Service) createMigrationRun(ctx context.Context, cmr cloudmigration.CloudMigrationRun) (string, error) {
uid, err := s.store.CreateMigrationRun(ctx, cmr)
if err != nil {
s.log.Error("Failed to save migration run", "err", err)