Merge pull request #3766 from thaJeztah/gofumpt

format code with gofumpt
This commit is contained in:
Hayley Swimelar
2022-11-04 12:19:53 +01:00
committed by GitHub
107 changed files with 404 additions and 483 deletions

View File

@@ -221,6 +221,7 @@ func populate(t *testing.T, te *testEnv, blobCount, size, numUnique int) {
te.inRemote = inRemote
te.numUnique = numUnique
}
func TestProxyStoreGet(t *testing.T) {
te := makeTestEnv(t, "foo/bar")
@@ -253,7 +254,6 @@ func TestProxyStoreGet(t *testing.T) {
if (*remoteStats)["get"] != 1 {
t.Errorf("Unexpected remote get count")
}
}
func TestProxyStoreStat(t *testing.T) {
@@ -284,7 +284,6 @@ func TestProxyStoreStat(t *testing.T) {
if te.store.authChallenger.(*mockChallenger).count != len(te.inRemote) {
t.Fatalf("Unexpected auth challenge count, got %#v", te.store.authChallenger)
}
}
func TestProxyStoreServeHighConcurrency(t *testing.T) {

View File

@@ -79,7 +79,7 @@ func (pms proxyManifestStore) Get(ctx context.Context, dgst digest.Digest, optio
pms.scheduler.AddManifest(repoBlob, repositoryTTL)
// Ensure the manifest blob is cleaned up
//pms.scheduler.AddBlob(blobRef, repositoryTTL)
// pms.scheduler.AddBlob(blobRef, repositoryTTL)
}

View File

@@ -271,5 +271,4 @@ func TestProxyManifests(t *testing.T) {
if env.manifests.authChallenger.(*mockChallenger).count != 2 {
t.Fatalf("Expected 2 auth challenges, got %#v", env.manifests.authChallenger)
}
}

View File

@@ -70,5 +70,4 @@ func init() {
pm.(*expvar.Map).Set("manifests", expvar.Func(func() interface{} {
return proxyMetrics.manifestMetrics
}))
}

View File

@@ -69,7 +69,6 @@ func TestSchedule(t *testing.T) {
s.Lock()
s.add(ref3, 1*timeUnit, entryTypeBlob)
s.Unlock()
}()
// Ensure all repos are deleted
@@ -195,7 +194,6 @@ func TestStopRestore(t *testing.T) {
if len(remainingRepos) != 0 {
t.Fatalf("Repositories remaining: %#v", remainingRepos)
}
}
func TestDoubleStart(t *testing.T) {