loadSnapIDManifests will return the list of manifests requested by the snapshot verify Arg values, to be interpreted as manifest IDs.
(ctx context.Context, rep repo.Repository)
| 250 | // loadSnapIDManifests will return the list of manifests requested by the |
| 251 | // snapshot verify Arg values, to be interpreted as manifest IDs. |
| 252 | func (c *commandSnapshotVerify) loadSnapIDManifests(ctx context.Context, rep repo.Repository) ([]*snapshot.Manifest, error) { |
| 253 | manifestIDs := toManifestIDs(c.verifyCommandSnapshotIDs) |
| 254 | |
| 255 | manifests, err := snapshot.LoadSnapshots(ctx, rep, manifestIDs) |
| 256 | if err != nil { |
| 257 | return nil, errors.Wrap(err, "unable to load snapshot manifests") |
| 258 | } |
| 259 | |
| 260 | if len(manifests) != len(manifestIDs) { |
| 261 | return nil, errors.Errorf("found %d of the %d requested snapshot IDs to verify", len(manifests), len(manifestIDs)) |
| 262 | } |
| 263 | |
| 264 | return manifests, nil |
| 265 | } |
no test coverage detected