(ctx context.Context)
| 141 | } |
| 142 | |
| 143 | func (c *commandSnapshotMigrate) openSourceRepo(ctx context.Context) (repo.Repository, error) { |
| 144 | pass, err := c.svc.passwordPersistenceStrategy().GetPassword(ctx, c.migrateSourceConfig) |
| 145 | if err != nil { |
| 146 | pass, err = c.svc.getPasswordFromFlags(ctx, false, false) |
| 147 | } |
| 148 | |
| 149 | if err != nil { |
| 150 | return nil, errors.Wrap(err, "source repository password") |
| 151 | } |
| 152 | |
| 153 | sourceRepo, err := repo.Open(ctx, c.migrateSourceConfig, pass, c.svc.optionsFromFlags(ctx)) |
| 154 | if err != nil { |
| 155 | return nil, errors.Wrap(err, "can't open source repository") |
| 156 | } |
| 157 | |
| 158 | return sourceRepo, nil |
| 159 | } |
| 160 | |
| 161 | func (c *commandSnapshotMigrate) migratePoliciesForSources(ctx context.Context, sourceRepo repo.Repository, destRepo repo.RepositoryWriter, sources []snapshot.SourceInfo) error { |
| 162 | for _, si := range sources { |
no test coverage detected