From f2db7faa2fc55eba62db0cb942174f2050adf066 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Sat, 26 Nov 2022 14:11:08 +0100 Subject: [PATCH] registry/storage: rename variables that collided with imports Signed-off-by: Sebastiaan van Stijn --- registry/storage/manifeststore_test.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/registry/storage/manifeststore_test.go b/registry/storage/manifeststore_test.go index eecea91e..efcc80b6 100644 --- a/registry/storage/manifeststore_test.go +++ b/registry/storage/manifeststore_test.go @@ -33,8 +33,8 @@ type manifestStoreTestEnv struct { func newManifestStoreTestEnv(t *testing.T, name reference.Named, tag string, options ...RegistryOption) *manifestStoreTestEnv { ctx := context.Background() - driver := inmemory.New() - registry, err := NewRegistry(ctx, driver, options...) + drvr := inmemory.New() + registry, err := NewRegistry(ctx, drvr, options...) if err != nil { t.Fatalf("error creating registry: %v", err) } @@ -46,7 +46,7 @@ func newManifestStoreTestEnv(t *testing.T, name reference.Named, tag string, opt return &manifestStoreTestEnv{ ctx: ctx, - driver: driver, + driver: drvr, registry: registry, repository: repo, name: name, @@ -434,25 +434,25 @@ func testOCIManifestStorage(t *testing.T, testname string, includeMediaTypes boo builder.AppendReference(distribution.Descriptor{Digest: dgst}) } - manifest, err := builder.Build(ctx) + mfst, err := builder.Build(ctx) if err != nil { t.Fatalf("%s: unexpected error generating manifest: %v", testname, err) } // before putting the manifest test for proper handling of SchemaVersion - if manifest.(*ocischema.DeserializedManifest).Manifest.SchemaVersion != 2 { + if mfst.(*ocischema.DeserializedManifest).Manifest.SchemaVersion != 2 { t.Fatalf("%s: unexpected error generating default version for oci manifest", testname) } - manifest.(*ocischema.DeserializedManifest).Manifest.SchemaVersion = 0 + mfst.(*ocischema.DeserializedManifest).Manifest.SchemaVersion = 0 var manifestDigest digest.Digest - if manifestDigest, err = ms.Put(ctx, manifest); err != nil { + if manifestDigest, err = ms.Put(ctx, mfst); err != nil { if err.Error() != "unrecognized manifest schema version 0" { t.Fatalf("%s: unexpected error putting manifest: %v", testname, err) } - manifest.(*ocischema.DeserializedManifest).Manifest.SchemaVersion = 2 - if manifestDigest, err = ms.Put(ctx, manifest); err != nil { + mfst.(*ocischema.DeserializedManifest).Manifest.SchemaVersion = 2 + if manifestDigest, err = ms.Put(ctx, mfst); err != nil { t.Fatalf("%s: unexpected error putting manifest: %v", testname, err) } }