forked from TrueCloudLab/distribution
Merge pull request #3766 from thaJeztah/gofumpt
format code with gofumpt
This commit is contained in:
commit
52d948a9f5
107 changed files with 404 additions and 483 deletions
|
@ -87,7 +87,8 @@ func TestCatalogAPI(t *testing.T) {
|
|||
|
||||
values := url.Values{
|
||||
"last": []string{""},
|
||||
"n": []string{strconv.Itoa(chunkLen)}}
|
||||
"n": []string{strconv.Itoa(chunkLen)},
|
||||
}
|
||||
|
||||
catalogURL, err := env.builder.BuildCatalogURL(values)
|
||||
if err != nil {
|
||||
|
@ -453,7 +454,6 @@ func TestBlobAPI(t *testing.T) {
|
|||
defer env2.Shutdown()
|
||||
args = makeBlobArgs(t)
|
||||
testBlobAPI(t, env2, args)
|
||||
|
||||
}
|
||||
|
||||
func TestBlobDelete(t *testing.T) {
|
||||
|
@ -1110,7 +1110,7 @@ const (
|
|||
|
||||
func (factory *storageManifestErrDriverFactory) Create(parameters map[string]interface{}) (storagedriver.StorageDriver, error) {
|
||||
// Initialize the mock driver
|
||||
var errGenericStorage = errors.New("generic storage error")
|
||||
errGenericStorage := errors.New("generic storage error")
|
||||
return &mockErrorDriver{
|
||||
returnErrs: []mockErrorMapping{
|
||||
{
|
||||
|
@ -1346,7 +1346,6 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name
|
|||
|
||||
for i := range unsignedManifest.FSLayers {
|
||||
rs, dgst, err := testutil.CreateRandomTarFile()
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("error creating random layer %d: %v", i, err)
|
||||
}
|
||||
|
@ -1450,7 +1449,6 @@ func testManifestAPISchema1(t *testing.T, env *testEnv, imageName reference.Name
|
|||
sm2, err := schema1.Sign(&fetchedManifestByDigest.Manifest, env.pk)
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
|
||||
}
|
||||
|
||||
// Re-push with a few different Content-Types. The official schema1
|
||||
|
@ -1684,7 +1682,6 @@ func testManifestAPISchema2(t *testing.T, env *testEnv, imageName reference.Name
|
|||
|
||||
for i := range manifest.Layers {
|
||||
rs, dgst, err := testutil.CreateRandomTarFile()
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("error creating random layer %d: %v", i, err)
|
||||
}
|
||||
|
@ -2279,7 +2276,6 @@ func testManifestDelete(t *testing.T, env *testEnv, args manifestArgs) {
|
|||
if len(tagsResponse.Tags) != 0 {
|
||||
t.Fatalf("expected 0 tags in response: %v", tagsResponse.Tags)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
type testEnv struct {
|
||||
|
@ -2308,7 +2304,6 @@ func newTestEnvMirror(t *testing.T, deleteEnabled bool) *testEnv {
|
|||
config.Compatibility.Schema1.Enabled = true
|
||||
|
||||
return newTestEnvWithConfig(t, &config)
|
||||
|
||||
}
|
||||
|
||||
func newTestEnv(t *testing.T, deleteEnabled bool) *testEnv {
|
||||
|
@ -2334,7 +2329,6 @@ func newTestEnvWithConfig(t *testing.T, config *configuration.Configuration) *te
|
|||
app := NewApp(ctx, config)
|
||||
server := httptest.NewServer(handlers.CombinedLoggingHandler(os.Stderr, app))
|
||||
builder, err := v2.NewURLBuilderFromString(server.URL+config.HTTP.Prefix, false)
|
||||
|
||||
if err != nil {
|
||||
t.Fatalf("error creating url builder: %v", err)
|
||||
}
|
||||
|
@ -2832,7 +2826,6 @@ func TestRegistryAsCacheMutationAPIs(t *testing.T) {
|
|||
blobURL, _ := env.builder.BuildBlobURL(ref)
|
||||
resp, _ = httpDelete(blobURL)
|
||||
checkResponse(t, "deleting blob from cache", resp, errcode.ErrorCodeUnsupported.Descriptor().HTTPStatusCode)
|
||||
|
||||
}
|
||||
|
||||
func TestProxyManifestGetByTag(t *testing.T) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue